Giter VIP home page Giter VIP logo

Comments (4)

carpedm20 avatar carpedm20 commented on June 10, 2024

Thanks for sharing your code. Did you tried to train the model with your code? If so, how does the samples look like?

from began-pytorch.

nian-liu avatar nian-liu commented on June 10, 2024

@carpedm20 Actually, here is another PyTorch implementation for BEGAN: https://github.com/sunshineatnoon/Paper-Implementations/tree/master/BEGAN. Although that code lacks two tanh layer at the ends of G and D networks, I found it works well after adding two tanh. After coarsely comparing that code with this one, I found that code strictly obeys the basic training scheme of GANs while this code does not. Maybe some senior tricks are used in this code that I can't undetstand, but you can try this:

  1. Use d_loss and g_loss to separately and successively update D and G instead of adding them up and updating the whole network once. (line 166 and 167 in trainer.py)
  2. Use g_loss = l1(AE_G_g, sample_z_G.detach()) on line 164

from began-pytorch.

Tyhye avatar Tyhye commented on June 10, 2024

500_g
5000_g
8000_g
17500_g
Here is some samples I generated. 500_G,5000_G,8000_G & 17500_G. I change the lr from 0.00008 to 0.00004 at 5000 iters and to 0.00002 at 10000iters.
I'm sure that I'm using non-optimal parameters and super-parameters. And I don't consider the measure when I update the lr.

from began-pytorch.

Tyhye avatar Tyhye commented on June 10, 2024

@nian-liu I've seen the code you refered. Maybe he has changed his code, the code to compute loss is similiar to mine.
image
And I guess the tanh() is helpful for solving pytorch's bad initialization. I'm not sure, just for communication.

from began-pytorch.

Related Issues (7)

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.