Giter VIP home page Giter VIP logo

Comments (3)

taesungp avatar taesungp commented on July 22, 2024 3

VAE should not be enabled if it was not specified in the option. In fact, the generator architecture is different depending on whether VAE is enabled or not, so it should be impossible to switch from one setting to another between training and test time.

It might be related to the discrepancy in batch norm between training and test time. At training time, it uses the batch statistics of the minibatch. At test time, it uses the saved batch statistics from checkpoint. This feature can be turned on and off by commenting .eval() in https://github.com/NVlabs/SPADE/blob/master/test.py#L20.

At the same time, I think your model has overfitted to the dataset. What's the size of the dataset?

from spade.

JianqiangRen avatar JianqiangRen commented on July 22, 2024

VAE should not be enabled if it was not specified in the option. In fact, the generator architecture is different depending on whether VAE is enabled or not, so it should be impossible to switch from one setting to another between training and test time.

It might be related to the discrepancy in batch norm between training and test time. At training time, it uses the batch statistics of the minibatch. At test time, it uses the saved batch statistics from checkpoint. This feature can be turned on and off by commenting .eval() in https://github.com/NVlabs/SPADE/blob/master/test.py#L20.

At the same time, I think your model has overfitted to the dataset. What's the size of the dataset?

Yes! After commented .eval(), the result become more vivid like origin real image. Below illustrates the comparison of turning on/off using saved batch statistics. As we can see, when using saved batch statistic, the results are dull, such as the color of sky and grass are always the same among all the outputs.
屏幕快照 2019-04-28 下午4 50 00
Since the batch size for training and test are 1, should we comment .eval() when testing? what's GauGAN setting?
My training dataset contains 1400 images, I think my model does overfitted to it, but without sufficient training epochs, the result always have a lot of artifacts. Maybe I need more images?

from spade.

taesungp avatar taesungp commented on July 22, 2024

For GauGAN, we trained with batch size 32, and at test time we turned eval() on with batch size 1.

Note that commenting out eval() will also affect spectral normalization. In detail, it will actually change the weights of the network every time you call forward. This may result in drifting in output image quality as you call many forward passes.

from spade.

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.