import glob import os.path import numpy as np import tensorflow as tf from tensorflow.python.platform import gfile import tensorflow.contrib.slim as slim # 加载通过TensorFlow-Slim定义好的inception_v3模型. import tensorflow.contrib.slim.python.slim.nets.incepti…
import tensorflow as tf INPUT_NODE = 784 OUTPUT_NODE = 10 IMAGE_SIZE = 28 NUM_CHANNELS = 1 NUM_LABELS = 10 CONV1_DEEP = 32 CONV1_SIZE = 5 CONV2_DEEP = 64 CONV2_SIZE = 5 FC_SIZE = 512 def inference(input_tensor, train, regularizer): with tf.variable_s…
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data INPUT_NODE = 784 # 输入节点 OUTPUT_NODE = 10 # 输出节点 LAYER1_NODE = 500 # 隐藏层数 BATCH_SIZE = 100 # 每次batch打包的样本个数 # 模型相关的参数 LEARNING_RATE_BASE = 0.8 LEARNING_RATE_DECAY = 0.9…
import tensorflow as tf a = tf.constant([1.0, 2.0], name="a") b = tf.constant([2.0, 3.0], name="b") result = a + b print(result) import tensorflow as tf g1 = tf.Graph() with g1.as_default(): v = tf.get_variable("v", [1], init…
#------------------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 11 # # Intermediate graphs # # requires packages car, scatterplot3d, gclus, hexbin, IDPmisc, Hmisc, # # corrgram, vcd, rlg to be in…
#------------------------------------------------------------------------------------# # R in Action (2nd ed): Chapter 11 # # Intermediate graphs # # requires packages car, scatterplot3d, gclus, hexbin, IDPmisc, Hmisc, # # corrgram, vcd, rlg to be in…