DCGAN-PyTorch icon indicating copy to clipboard operation
DCGAN-PyTorch copied to clipboard

Concern about the validation of training strategy

Open lyf1212 opened this issue 2 years ago • 3 comments

Are you sure you make a right training of you model? In my view, the loss jitters to much. Can you spend a little time to fix it?

lyf1212 avatar Feb 26 '23 04:02 lyf1212

I have the same problem here but I wrote my code based on the pytorch example and it still doesn't work. From my limited understanding, the discriminator loss should always be quite low but never 0 (otherwise the generator can't learn) and will slowly increase as the generator improves. For example, here's the graph on the original pytorch tutorial sphx_glr_dcgan_faces_tutorial_002 looks perfect right? welp, here's what I get image I don't know what to do.....

rafa-br34 avatar Aug 25 '24 04:08 rafa-br34

I have the same problem here but I wrote my code based on the pytorch example and it still doesn't work. From my limited understanding, the discriminator loss should always be quite low but never 0 (otherwise the generator can't learn) and will slowly increase as the generator improves. For example, here's the graph on the original pytorch tutorial sphx_glr_dcgan_faces_tutorial_002 looks perfect right? welp, here's what I get image I don't know what to do.....

As it's known well, GAN training is confusing and painful sometimes. If you still want to try, adjust learning rate, optimizer hyperparameters or other settings, and print necessary logs during training, not only loss values, but also image outputs. But in my opinion, DCGAN indeed made a remarkable progress, it;s meaningless to retrain it with limited computational resource. FYI.

lyf1212 avatar Sep 06 '24 05:09 lyf1212

As it's known well, GAN training is confusing and painful sometimes. If you still want to try, adjust learning rate, optimizer hyperparameters or other settings, and print necessary logs during training, not only loss values, but also image outputs. But in my opinion, DCGAN indeed made a remarkable progress, it;s meaningless to retrain it with limited computational resource. FYI.

I agree, the only reason why I'm trying to train a DCGAN is that (in my opinion) it seems to be the best way to get hands-on experience with adversarial loss, most modern architectures use this type of loss (high-fidelity VAEs for instance), but I can't deny that I was much more successful at training a barely functional SD model than any GANs so far lol.

rafa-br34 avatar Sep 06 '24 06:09 rafa-br34