Giter VIP home page Giter VIP logo

Comments (8)

AlexiaJM avatar AlexiaJM commented on July 21, 2024

We penalize the discriminator so the loss of G shouldn't increase too much. Do you use the default settings? Btw, you might need the bleeding-edge version of Pytorch to run WGAN-GP because backward of gradients is not yet in the stable release, I think.

from deep-learning-with-cats.

ypxie avatar ypxie commented on July 21, 2024

Thanks for your reply. I updated my pytorch.
By the way. Could you also elaborate more about why did the current code do backward two times (one for real, and one for fake) rather than do total_loss.backward() once? Are there any specific reasons?

from deep-learning-with-cats.

AlexiaJM avatar AlexiaJM commented on July 21, 2024

Hi ypxie,

This is because the loss function include D, G and the penalty of the gradient. Once we got everything added to the gradients (from the backward steps), we minimize the loss. See formula (3) on p4:
https://arxiv.org/pdf/1704.00028.pdf

from deep-learning-with-cats.

ypxie avatar ypxie commented on July 21, 2024

Thanks for your reply.
I mean why don't you directly use the following? Isn't this more efficient?
d_loss = err_fake - err_real + grad_penalty
d_loss.backward()

from deep-learning-with-cats.

AlexiaJM avatar AlexiaJM commented on July 21, 2024

In big O complexity, it would be the same. If you think that in practice, it would be faster, you can try and benchmark it and if you show that it's faster, make a pull request and we'll change it.

from deep-learning-with-cats.

ypxie avatar ypxie commented on July 21, 2024

Thank you for your reply.
Did you also try the whole meow dataset besides the cat face?

from deep-learning-with-cats.

AlexiaJM avatar AlexiaJM commented on July 21, 2024

That's what I did the first time I tried but it wouldn't converge. This was using DCGAN though and using old code. You can always retry but this is likely not to converge because it's a too complex and noisy thing to model, especially with a small dataset (10k is small for pictures). So far, GANs trying to generate images with imagenet tends to create images that don't make much sense or are extremely low resolution. We're are still not there yet (someone correct me if I wrong).

from deep-learning-with-cats.

ypxie avatar ypxie commented on July 21, 2024

Thanks for your reply. I also find it very difficult to get meaningful images using the full meow dataset. I am now trying some more complex models, I will let you know if I could generate nice images.

from deep-learning-with-cats.

Related Issues (15)

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.