dd9512019c67fdb06c0e53991608d36ca5cdf920,loss.py,GeneratorAdversarialWithContentLoss,forward,#GeneratorAdversarialWithContentLoss#Any#Any#Any#,38
Before Change
def forward(self, out_labels, out_images, target_images):
// Adversarial Loss
// adversarial_loss = torch.mean(torch.log(1 - out_labels))
adversarial_loss = -out_labels.mean()
// Content Loss
features_input = self.loss_network(out_images)
features_target = self.loss_network(target_images)
content_loss = self.mse_loss(features_input, features_target)
After Change
def forward(self, out_labels, out_images, target_images):
// Adversarial Loss
adversarial_loss = torch.mean(torch.log(1 - out_labels))
// Content Loss
features_input = self.loss_network(out_images)
features_target = self.loss_network(target_images)
content_loss = self.mse_loss(features_input, features_target)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
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: 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: c3b1005e6689518406f49a496b5233cfcbe4d0ed
Time: 2017-12-06
Author: leftthomas@qq.com
File Name: loss.py
Class Name: GeneratorLoss
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