Skip to content

Crashes 1st time when loss output is reached and cannot restore from last model #2

@hofpcp

Description

@hofpcp

Hi Thomas,

Great work with this, was trying myself to change the Udacity DCGAN to accept new data with no luck, was happy too see someone had cracked it :-)

But have run into a few problems:

  1. First time def train reaches i=1500 program crashes with the following error:

NameError Traceback (most recent call last)
in ()
4 with tf.Graph().as_default():
5 losses, samples = train(epochs, batch_size, z_dim, learning_rate_D, learning_rate_G, beta1, dataset.get_batches,
----> 6 dataset.shape, dataset.image_mode, alpha)

in train(epoch_count, batch_size, z_dim, learning_rate_D, learning_rate_G, beta1, get_batches, data_shape, data_image_mode, alpha)
80
81
---> 82 return losses, samples

NameError: name 'losses' is not defined

  1. Set from_checkpoint = True and received following error when running tf.graph():
    INFO:tensorflow:Restoring parameters from ./models/model.ckpt

UnboundLocalError Traceback (most recent call last)
in ()
4 with tf.Graph().as_default():
5 losses, samples = train(epochs, batch_size, z_dim, learning_rate_D, learning_rate_G, beta1, dataset.get_batches,
----> 6 dataset.shape, dataset.image_mode, alpha)

in train(epoch_count, batch_size, z_dim, learning_rate_D, learning_rate_G, beta1, get_batches, data_shape, data_image_mode, alpha)
35
36
---> 37 show_generator_output(sess, 4, input_z, data_shape[3], data_image_mode, image_path, True, False)
38
39 else:

UnboundLocalError: local variable 'image_path' referenced before assignment

I am running on a local machine with GPU and Tensorflow version 1.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions