July 2019
Intermediate to advanced
512 pages
19h 39m
English
Define the decoder network for reconstructing the image. It consists of three fully connected networks, as follows:
with tf.name_scope('Decoder'): #masked digit capsule v_j = tf.reshape(masked_v, shape=(batch_size, -1)) #first fully connected layer fc1 = tf.contrib.layers.fully_connected(v_j, num_outputs=512) #second fully connected layer fc2 = tf.contrib.layers.fully_connected(fc1, num_outputs=1024) #reconstructed image reconstructed_image = tf.contrib.layers.fully_connected(fc2, num_outputs=784, activation_fn=tf.sigmoid)
Read now
Unlock full access