July 2019
Intermediate to advanced
512 pages
19h 39m
English
Define the placeholder for the input:
image_width = x_train.shape[1]image_height = x_train.shape[2]image_channels = x_train.shape[3]x = tf.placeholder(tf.float32, shape= (None, image_width, image_height, image_channels), name="d_input")
Define the placeholder for the learning rate and training boolean:
learning_rate = tf.placeholder(tf.float32, shape=(), name="learning_rate")is_training = tf.placeholder(tf.bool, [], name='is_training')
Define the batch size and dimension of the noise:
batch_size = 100z_dim = 100
Define the placeholder for the noise, z:
z = tf.random_normal([batch_size, z_dim], mean=0.0, stddev=1.0, name='z')
Read now
Unlock full access