I am new to python coding and using tensorflow, that being said this may be a dumb question. I was following the pokeGAN tutorial done by Siraj, and he doesn't really comment on the test function. I have trained the model, but when I uncomment the test function, it just exits with a code of 0, and gives me no image it may have generated. I know the exit code of 0 means there was no errors, but I am curious as to why its not generating an image. Is the function just not telling it to generate an image? Is there something else that needs to be uncommented (or commented) out to make it work correctly? Any help would be great.
Here is a link to the github for the code in its entirety: pokeGAN
Here is the actual test function:
def test():
random_dim = 100
with tf.variable_scope('input'):
real_image = tf.placeholder(tf.float32, shape=[None, HEIGHT, WIDTH, CHANNEL], name='real_image')
random_input = tf.placeholder(tf.float32, shape=[None, random_dim], name='rand_input')
is_train = tf.placeholder(tf.bool, name='is_train')
# wgan
fake_image = generator(random_input, random_dim, is_train)
real_result = discriminator(real_image, is_train)
fake_result = discriminator(fake_image, is_train, reuse=True)
sess = tf.InteractiveSession()
sess.run(tf.global_variables_initializer())
variables_to_restore = slim.get_variables_to_restore(include=['gen'])
print(variables_to_restore)
saver = tf.train.Saver(variables_to_restore)
ckpt = tf.train.latest_checkpoint('./model/' + version)
saver.restore(sess, ckpt)