2017-fall-DL-training-program / VAE-GAN-and-VAE-GAN

An assignment to learn how to implement three differnent kinds of generative models
2 stars 0 forks source link

[Lab3-2] Question about loss function of discriminator #7

Open doom8199 opened 6 years ago

doom8199 commented 6 years ago

Dear TA: I tried to modify sample code below, but finally got the garbage results QQ ... Could you give me some hints why this change cannot work ?

errD_real = criterion(...)

errD_real.backward()

errD_fake = criterion(...)

errD_fake.backward()

errD = errD_real + errD_fake errD.backward()

[Note] Training dataloader has been followed by Lab3_2's requirement.

hui-po-wang commented 6 years ago

Hi @doom8199,

At first glance, they should be equal if you didn't modify anything else. It's hard to debug without any details.

Thanks

doom8199 commented 6 years ago

Dear TA: Details are just code changes I mentioned before. I will try to run more than one time to see if it can be reproducible or not.