Code Monkey home page Code Monkey logo

catdcgan's Issues

Losses variable is not defined in the train function

Hi I was running this code on the same Cat dataset, everything is good but I am getting an error regarding losses variable return by the train function.
Can you please fix this error.
I am attaching the error report below

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,
----> 6 dataset.get_batches, 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)
81
82
---> 83 return losses, samples

NameError: name 'losses' is not defined

missing preprocess_cat_dataset.py

python: can't open file 'preprocess_cat_dataset.py': [Errno 2] No such file or directory
rm: cannot remove 'cat_dataset': No such file or directory

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.