February 2018
Intermediate to advanced
450 pages
11h 27m
English
In the previous section, we went through some examples that were generated during the training process of this GAN architecture. We can also generate completely new images from the generator by loading the checkpoints that we have saved and feeding the generator with a new latent space that it can use to generate new images:
# Sampling from the generatorsaver = tf.train.Saver(var_list=g_vars)with tf.Session() as sess: #restoring the saved checkpints saver.restore(sess, tf.train.latest_checkpoint('checkpoints')) gen_sample_z = np.random.uniform(-1, 1, size=(16, z_size)) generated_samples = sess.run( generator(generator_input_z, input_img_size, reuse_vars=True), feed_dict={generator_input_z: gen_sample_z})view_generated_samples(0, ...Read now
Unlock full access