GAN loss curve Weird

username: davidlee
cooked: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/e/3/e32855f94b70928ffbab2cd77422cb51ab93eee0.png" data-download-href="https://discuss.pytorch.org/uploads/default/e32855f94b70928ffbab2cd77422cb51ab93eee0" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/e/3/e32855f94b70928ffbab2cd77422cb51ab93eee0_2_690x329.png" alt="image" data-base62-sha1="wpwNU72bFNa5v270kB2Xe3UcP1m" width="690" height="329" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/e/3/e32855f94b70928ffbab2cd77422cb51ab93eee0_2_690x329.png, https://discuss.pytorch.org/uploads/default/original/3X/e/3/e32855f94b70928ffbab2cd77422cb51ab93eee0.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/e/3/e32855f94b70928ffbab2cd77422cb51ab93eee0.png 2x" data-dominant-color="F9F9F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">710×339 15 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Hi,<br>
Like the picture attached, I’m undergoing the abnormal loss curve situation.<br>
Do you know how to solve this?</p>

username: ptrblck
cooked: <p>Without knowing anything about your use case, I would suggest to play around with some hyperparameters and if that doesn’t help, dig deeper into the model architecture.</p>

username: davidlee
cooked: <p>I appreciate with your help, ptrblck However i have one more quick questions,</p>
<p>What is an ideal loss curve of G and D when i use the criterion as “torch.nn.BCELoss”?</p>
<pre><code>criterion = torch.nn.BCELoss()
outputs= = D(real_images, y)
real_loss = criterion(outputs, real_labels)
outputs = D(fake_images, y)
fake_loss = criterion(outputs, fake_labels)     
d_loss = real_loss + fake_loss

g_loss = criterion(discriminator_outputs, real_labels)
</code></pre>
<p>Should both G_loss and D_loss be decreasing?<br>
or D_loss should be decreasing while the G_loss should be increasing??<br>
And Can i just sum real and fake loss for D_loss or should they be averaged for D_loss?</p>
<p>And my case, i want to generate numeric features with 12 dimensions like attached.<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/5/556ff8367ca65f3df47110c3c16da58a35ae67fb.png" data-download-href="https://discuss.pytorch.org/uploads/default/556ff8367ca65f3df47110c3c16da58a35ae67fb" title="스크린샷 2020-01-19 오후 12.24.03"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/5/5/556ff8367ca65f3df47110c3c16da58a35ae67fb_2_690x459.png" alt="스크린샷 2020-01-19 오후 12.24.03" data-base62-sha1="cbOtG9Z4snkuz4V5toa5HZCBB6r" width="690" height="459" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/5/5/556ff8367ca65f3df47110c3c16da58a35ae67fb_2_690x459.png, https://discuss.pytorch.org/uploads/default/optimized/3X/5/5/556ff8367ca65f3df47110c3c16da58a35ae67fb_2_1035x688.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/5/5/556ff8367ca65f3df47110c3c16da58a35ae67fb_2_1380x918.png 2x" data-dominant-color="F0F0F0"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">스크린샷 2020-01-19 오후 12.24.03</span><span class="informations">1728×1150 116 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>