Comments (8)
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.
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.
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.
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.
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.
Thank you for your reply.
Did you also try the whole meow dataset besides the cat face?
from deep-learning-with-cats.
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.
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)
- try learning rates from "GANs Trained by a Two Time-Scale Update Rule Converge to a Nash Equilibrium": https://arxiv.org/abs/1706.08500 HOT 1
- What would be interesting to see is for each cat the training example closest to it HOT 2
- Would be interesting to try BEGAN HOT 1
- dataset download failed HOT 1
- Train the real and fake data separately or simultaneously? HOT 1
- TypeError: unsupported operand type(s) for /: 'tuple' and 'int' HOT 1
- SELU weight init HOT 3
- Cat DataSet HOT 2
- Data set problem HOT 1
- Blur caused by WGAN-GP HOT 1
- Invalid Syntax Error HOT 1
- Question about WGAN HOT 1
- How to make folder contain subfolders contain images ? HOT 1
- Some problem happens when we store one image using vutils.save_image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deep-learning-with-cats.