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

Use of tf.nn.moments in batch_norm class #41

Open
rajmphasis opened this issue Mar 21, 2018 · 0 comments
Open

Use of tf.nn.moments in batch_norm class #41

rajmphasis opened this issue Mar 21, 2018 · 0 comments

Comments

@rajmphasis
Copy link

As I went through the code, in Discriminator code, we are using the same block thrice, Once for real images, then for fake and wrong images with variable reuse. But when we reach "batch_norm" __call() function, for Second time with reuse=True, it tries to reuse all the variables in __call(). Similar thing happens with ema.apply(). We have created two variables batch_mean and batch_var which we pass to ema.apply(). Then as we have already set reuse to True, these variables do not get added to our global_variables list.
So , as this code has single scope for all variables in __call() with reuse being set to True, there is conflict. I am not able to run that code segment. Any explanation on use of tf.nn.moments in __call() will be appreciated.

Thanks

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

1 participant