import tensorflow as tf
import numpy as np
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.contrib.tensorboard.plugins import projector
import time
IMAGE_PIXELS = 28
hidden_unit = 100
output_nums = 10
learning_rate = 0.001
train_steps = 50000
batch_size = 500
test_data_size = 10000
logdir = 'D:/Develop_Software/Anaconda3/WorkDirectory/summary/mnist'
mnist = input_data.read_data_sets('MNIST_data', one_hot = True)
global_step = tf.Variable(0, name = 'global_step', trainable = False)
with tf.name_scope('input'):
with tf.name_scope('x'):
x = tf.placeholder(
dtype = tf.float32, shape = (None, IMAGE_PIXELS * IMAGE_PIXELS))
with tf.name_scope('x_summary'):
shaped_image_batch = tf.reshape(
tensor = x,
shape = (-1, IMAGE_PIXELS, IMAGE_PIXELS, 1),
name = 'shaped_image_batch')
tf.summary.image(name = 'image_summary',
tensor = shaped_image_batch,
max_outputs = 10)
with tf.name_scope('y_'):
y_ = tf.placeholder(dtype = tf.float32, shape = (None