5547ddeb618eb9d8b3dbbee5b4313dc697d78b09,vocoder/layers/losses.py,MSEDLoss,forward,#MSEDLoss#Any#Any#,111

Before Change


     Mean Squared Discriminator Loss 
    // pylint: disable=no-self-use
    def forward(self, score_fake, score_real):
        loss_real = torch.mean(torch.sum(torch.pow(score_real - 1.0, 2), dim=[1, 2]))
        loss_fake = torch.mean(torch.sum(torch.pow(score_fake, 2), dim=[1, 2]))
        loss_d = loss_real + loss_fake
        return loss_d, loss_real, loss_fake

After Change


    // pylint: disable=no-self-use
    def forward(self, score_fake, score_real):
        loss_real = self.loss_func(score_real, score_real.new_ones(score_real.shape))
        loss_fake = self.loss_func(score_fake, score_fake.new_zeros(score_fake.shape))
        loss_d = loss_real + loss_fake
        return loss_d, loss_real, loss_fake

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: mozilla/TTS
Commit Name: 5547ddeb618eb9d8b3dbbee5b4313dc697d78b09
Time: 2020-06-15
Author: erogol@hotmail.com
File Name: vocoder/layers/losses.py
Class Name: MSEDLoss
Method Name: forward


Project Name: mozilla/TTS
Commit Name: 3eb730acf0a660d96f3af78cde0f5379b72fb3c6
Time: 2020-06-12
Author: erogol@hotmail.com
File Name: vocoder/layers/losses.py
Class Name: MelganFeatureLoss
Method Name: forward


Project Name: mozilla/TTS
Commit Name: 5547ddeb618eb9d8b3dbbee5b4313dc697d78b09
Time: 2020-06-15
Author: erogol@hotmail.com
File Name: vocoder/layers/losses.py
Class Name: MelganFeatureLoss
Method Name: forward


Project Name: mozilla/TTS
Commit Name: 3eb730acf0a660d96f3af78cde0f5379b72fb3c6
Time: 2020-06-12
Author: erogol@hotmail.com
File Name: vocoder/layers/losses.py
Class Name: MSEDLoss
Method Name: forward