InfoGAN icon indicating copy to clipboard operation
InfoGAN copied to clipboard

An undefined variable for the function conv_batch_norm() in custom_ops.py?

Open RutgersHan opened this issue 8 years ago • 1 comments

In infogan/misc/custom_ops.py line 33, 'x' is a undefined variable for the function conv_batch_norm()?

Also, how and where can we change the argument 'phase' to 'Phase.test' and run the code in line 32-35? Thanks.

RutgersHan avatar Dec 11 '16 02:12 RutgersHan

Yeah, I noticed that, too. I think the test phase graph from the function conv_batch_norm() was meant to be invoked by this part of infogan/algos/infogan_trainer.pyin lines 126-128:

        with pt.defaults_scope(phase=pt.Phase.test):
            with tf.variable_scope("model", reuse=True) as scope:
                self.visualize_all_factors()

However, it does not seem to actually to do that, which is why the undefined variable issue went unnoticed I guess. But this also means that the visualization does not use the test phase graph and the exponential window average. Which in turn means that the visualization of the factors uses the normalization of the test batches and not the normalization learned during training.

For MNIST the quality of the images does not seem to effected all that much, but I tried it extensively with some custom datasets and there it is definitely an issue!

layerwise avatar Jan 14 '17 12:01 layerwise