April 2017
Intermediate to advanced
320 pages
7h 46m
English
Here we have the entire code for the implemented ReLU classifier:
import mnist_data import tensorflow as tf import math logs_path = 'log_simple_stats_5_layers_relu_softmax' batch_size = 100 learning_rate = 0.5 training_epochs = 10 mnist = mnist_data.read_data_sets("data") X = tf.placeholder(tf.float32, [None, 28, 28, 1]) Y_ = tf.placeholder(tf.float32, [None, 10]) lr = tf.placeholder(tf.float32) # five layers and their number of neurons (tha last layer has 10 softmax neurons) L = 200 M = 100 N = 60 O = 30 W1 = tf.Variable(tf.truncated_normal([784, L], stddev=0.1 B1 = tf.Variable(tf.ones([L])/10) W2 = tf.Variable(tf.truncated_normal([L, M], stddev=0.1)) B2 = tf.Variable(tf.ones([M])/10) W3 = tf.Variable(tf.truncated_normal([M, ...Read now
Unlock full access