def get_input(self):
# Input data.
# Load the training, validation and test data into constants that are
# attached to the graph.
self.mnist = input_data.read_data_sets('data',
one_hot=True,
fake_data=False)
# Input placehoolders
with tf.name_scope('input'):
self.x = tf.placeholder(tf.float32, [None, 784], name='x-input')
self.y_true = tf.placeholder(tf.float32, [None, 10], name='y-input')
self.keep_prob = tf.placeholder(tf.float32, name='drop_out')
# below is just for the sake of visualization
with tf.name_scope('input_reshape'):
image_shaped_input = tf.reshape(self.x, [-1, 28, 28, 1])
tf.image_summary('input', image_shaped_input, 10)
return
评论列表
文章目录