GithubHelp home page GithubHelp logo

zju-vipa / osgan Goto Github PK

View Code? Open in Web Editor NEW
36.0 36.0 7.0 2.94 MB

One-Stage GAN for Efficient Adversarial Learning. The implementation of CVPR 2021 paper: Training Generative Adversarial Networks in One Stage.

Python 100.00%

osgan's People

Contributors

sccbhxc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

osgan's Issues

Prevent gamma from being -inf

I changed the adversarial loss to hinge gan loss, and gamma will often be -inf in the training loop, then the training will be crash.
How can I adjust the "get_gradient_ratios" to prevent gamma from being -inf?

Apply to PatchGAN

Thanks for sharing your code and it's really a great work.
Can your technique be applied to PatchGAN?

How to extract the gradient of the generator in one-stage

Thanks for sharing your code and it's really a great work.

I would like to apply this technique to other models using GANs to reduce the training time.
For implementation, I have two questions about your code.

  1. Why do you set reduction='none' and get the average from loss_fake in one stage ?
    train_dcgan_asymmetric_one_stage_simple.py#L60
  2. How do you extract the gradient of the generator from the gradient of the Discriminator?
    In this code train_dcgan_asymmetric_one_stage_simple.py#L72, I think that the generator backpropagates the same gradient as the discriminator.

Thank you.

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.