We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Why there are two types of discriminator loss as follows: # pred_d_real = self.netD(self.var_ref) # pred_d_fake = self.netD(self.fake_H.detach()) # detach to avoid BP to G # l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True) # l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real), False) # l_d_total = (l_d_real + l_d_fake) / 2 # l_d_total.backward() pred_d_fake = self.netD(self.fake_H.detach()).detach() pred_d_real = self.netD(self.var_ref) l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True) * 0.5 l_d_real.backward() pred_d_fake = self.netD(self.fake_H.detach()) l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real.detach()), False) * 0.5 l_d_fake.backward()
# pred_d_real = self.netD(self.var_ref)
# pred_d_fake = self.netD(self.fake_H.detach()) # detach to avoid BP to G
# l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True)
# l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real), False)
# l_d_total = (l_d_real + l_d_fake) / 2
# l_d_total.backward()
pred_d_fake = self.netD(self.fake_H.detach()).detach()
pred_d_real = self.netD(self.var_ref)
l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True) * 0.5
l_d_real.backward()
pred_d_fake = self.netD(self.fake_H.detach())
l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real.detach()), False) * 0.5
l_d_fake.backward()
The text was updated successfully, but these errors were encountered:
The discriminator has two losses for real and fake samples, respectively~
Sorry, something went wrong.
[CodeCamp #83] Support Restormer model (#1503)
b13cd06
* Merge branch 'cndocs' of https://github.com/AlexZou14/mmediting into cndocs * Add Restormer * Add einops * Create test_restormer_net.py * Refactor deraining config * Update restormer_net.py * Refactor config * Update restormer_official_rain13k.py * Update deraining_test_config.py * Fix Restormer Readme * Fix runtime.txt * refactor configs * rename deblurring config * rename deblurring config * Fix config and Fix docstring * Update runtime.txt * fix typo * remove edit_dual_data_preprocessor * Fix test_restormer_net.py typo * Add denoising_real and fix config typo * Fix Some typo * Fix Typo * fix configs * fix dpdd dataset * fix readme * Fix Readme * Fix README_zh-CN * Fix Typo * support dual deblur and fix pad * fix ut * update metrics * Fix test_dual_restormer * fix ut * fix typo Co-authored-by: Z-Fran <1396925302@qq.com> Co-authored-by: Z-Fran <49083766+Z-Fran@users.noreply.github.com>
No branches or pull requests
Why there are two types of discriminator loss as follows:
# pred_d_real = self.netD(self.var_ref)
# pred_d_fake = self.netD(self.fake_H.detach()) # detach to avoid BP to G
# l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True)
# l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real), False)
# l_d_total = (l_d_real + l_d_fake) / 2
# l_d_total.backward()
pred_d_fake = self.netD(self.fake_H.detach()).detach()
pred_d_real = self.netD(self.var_ref)
l_d_real = self.cri_gan(pred_d_real - torch.mean(pred_d_fake), True) * 0.5
l_d_real.backward()
pred_d_fake = self.netD(self.fake_H.detach())
l_d_fake = self.cri_gan(pred_d_fake - torch.mean(pred_d_real.detach()), False) * 0.5
l_d_fake.backward()
The text was updated successfully, but these errors were encountered: