Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tiny issues in GAN #4

Closed
ivanjacobs opened this issue May 26, 2019 · 2 comments
Closed

some tiny issues in GAN #4

ivanjacobs opened this issue May 26, 2019 · 2 comments

Comments

@ivanjacobs
Copy link

Hey great read and great code.
I stumbled on some tiny issues when running the GAN:
in def train_discriminator
the:

else:
            idx = np.random.randint(0, x_train.shape[0], batch_size)
            true_imgs = x_train[idx]

should be

else:
           idx = np.random.randint(0, x_train[0].shape[0], batch_size)
            true_imgs = x_train[0][idx]

as it comes back with x at [0] and y at [1]
when running the train I had to use:

graph = tf.get_default_graph()
with graph.as_default():
     gan.train(........

as it was complaining about tensors not being part of the graph. that seems to be a Keras issue.

@davidADSP
Copy link
Owner

Can you let me know which notebook you're running to see this error?

@davidADSP
Copy link
Owner

I can't replicate this error - if you let me know which notebook produces the error or link to a reproducible example, I'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants