GithubHelp home page GithubHelp logo

Very large d_loss about pro_gan_pytorch HOT 3 CLOSED

akanimax avatar akanimax commented on May 24, 2024
Very large d_loss

from pro_gan_pytorch.

Comments (3)

akanimax avatar akanimax commented on May 24, 2024

@jiujing23333,

I presume you are using a multi-gpu setup here.
Yes, this is currently a know issue (bug) with the package. The MinBatchStd layer is not properly optimized to take care of the data-parallel Multi-GPU setup. There is currently no synchronization taking place for the divided minibatch to obtain the proper minibatchstd values back at GPU_1. I am working on a solution which just involves removing the last layer of the discriminator out of the dataParallel block so that everything synchronizes before the last layer's calculations are performed. But this is a temporary solution since, it makes the training way slower and consumes very little of the other parallel GPUs.

For now, you could either ignore the very high loss values produced by only the discriminator [they will go even bigger 😆], because the GAN trains fine. Or, you could run the code on only one gpu.

Please feel free to ask if you have any more questions.

Also, please feel free to suggest if you have a better solution for this problem.

Cheers 🍻!
@akanimax

from pro_gan_pytorch.

jiujing23333 avatar jiujing23333 commented on May 24, 2024

@akanimax
Very thanks, it really works. Now I have another problem, the parameter beta of EMA is set as 0 in your code, which means EMA is always closed. Why?

from pro_gan_pytorch.

jiujing23333 avatar jiujing23333 commented on May 24, 2024

@akanimax
I'm so sorry. I notice that the zero beta is only for init...

from pro_gan_pytorch.

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.