Skip to content

Instantly share code, notes, and snippets.

View lijiansong's full-sized avatar
🛠️
造轮子...

Json Lee lijiansong

🛠️
造轮子...
View GitHub Profile
@lijiansong
lijiansong / checkmate_tutorial_basic_tf2_example.ipynb
Last active May 8, 2021 01:18
tutorial_basic_tf2_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import math
import datetime
from tqdm import tqdm
import pandas as pd
import numpy as np
import tensorflow as tf
"""TensorFlow 2.0 implementation of vanilla Autoencoder."""
import numpy as np
import tensorflow as tf
__author__ = "Abien Fred Agarap"
np.random.seed(1)
tf.random.set_seed(1)
batch_size = 128
epochs = 10

Build TF 2.0 from source

Step 1:

从anaconda的base环境中创建新的环境:

$ conda create -n tf2-source python=3.6
$ conda activate tf2-source
name: "ZF"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 720 #770 725
dim: 1280 #683 1285
}
input: "im_info"
name: "MOBILENET_V2"
# transform_param {
# scale: 0.017
# mirror: false
# crop_size: 224
# mean_value: [103.94,116.78,123.68]
# }
input: "data"
input_shape {
dim: 1
name: "VGG_VOC0712_SSD_300x300_deploy"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
layer {
name: "MobileNet-SSD"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
layer {
name: "DENSENET_121"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
layer {
name: "conv1"
name: "ResNet-50"
input: "data"
input_shape{
dim: 1
dim: 3
dim: 224
dim: 224
}
layer {