3b13f1e6b5f5ac19511cb80f8107d4a1e077beca,loss.py,GeneratorLoss,forward,#GeneratorLoss#,15
Before Change
def forward(self, out_labels, out_images, target_images):
// Adversarial Loss
adversarial_loss = - out_labels.mean()
// Perception Loss
perception_loss = self.mse_loss(self.loss_network(out_images), self.loss_network(target_images))
// Image Loss
image_loss = self.mse_loss(out_images, target_images)
After Change
def forward(self, out_labels, out_images, target_images):
// Adversarial Loss
adversarial_loss = torch.mean(torch.log(1 - out_labels))
// Perception Loss
perception_loss = self.mse_loss(self.loss_network(out_images), self.loss_network(target_images))
// Image Loss
image_loss = self.mse_loss(out_images, target_images)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
Instances
Project Name: leftthomas/SRGAN
Commit Name: 3b13f1e6b5f5ac19511cb80f8107d4a1e077beca
Time: 2017-12-03
Author: leftthomas@qq.com
File Name: loss.py
Class Name: GeneratorLoss
Method Name: forward
Project Name: leftthomas/SRGAN
Commit Name: dd9512019c67fdb06c0e53991608d36ca5cdf920
Time: 2017-12-02
Author: leftthomas@qq.com
File Name: loss.py
Class Name: GeneratorAdversarialWithContentLoss
Method Name: forward
Project Name: leftthomas/SRGAN
Commit Name: fc4dd32ffa1c07db00b66ac136356b41348b8e7d
Time: 2017-12-04
Author: leftthomas@qq.com
File Name: loss.py
Class Name: GeneratorLoss
Method Name: forward
Project Name: leftthomas/SRGAN
Commit Name: c3b1005e6689518406f49a496b5233cfcbe4d0ed
Time: 2017-12-06
Author: leftthomas@qq.com
File Name: loss.py
Class Name: GeneratorLoss
Method Name: forward