Giter Club home page Giter Club logo

Comments (5)

ppwwyyxx avatar ppwwyyxx commented on May 28, 2024 3

You can add the line

            with tf.variable_scope(tf.get_variable_scope(), reuse=False):

before ema.apply in ops.py:35.
Note that this is a quick hack and the real fix should come from tensorflow.
Also a duplicate of #57.

from dcgan-tensorflow.

ppwwyyxx avatar ppwwyyxx commented on May 28, 2024 2

I've seen the same problem. This is due to changes in TF0.11 where exponential moving average cannot be under a reuse=True scope. See tensorflow/tensorflow#2740.
You can modify the code to force reuse=False around exponential moving average, like what's been done here.

from dcgan-tensorflow.

AStrangeQuark avatar AStrangeQuark commented on May 28, 2024

@ppwwyyxx Could you explain how you would apply such a modification in this code? I don't know TF well enough to figure out where exactly you would force the EMA to be done outside of a scope (or... whatever is going on...).

from dcgan-tensorflow.

nemtiax avatar nemtiax commented on May 28, 2024

We're trying to update the code to use tf.contrib.layers.batch_norm to avoid this issue, but the results we see on mnist are noticeably worse. Are there any important differences between the batch_norm code used here in ops.py and the methods used in the contrib.layers version that might explain the discrepancy?

from dcgan-tensorflow.

shimafoolad avatar shimafoolad commented on May 28, 2024

On tensorflow 1.12.0, I had the same problem and fixed it by adding the line:

        with tf.variable_scope(tf.get_variable_scope(), reuse=tf.AUTO_REUSE):

before ema.apply

from dcgan-tensorflow.

Related Issues (20)

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.