5547ddeb618eb9d8b3dbbee5b4313dc697d78b09,vocoder/layers/losses.py,MSEGLoss,forward,#MSEGLoss#Any#,90

Before Change


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


class HingeGLoss(nn.Module):

After Change


     Mean Squared Generator Loss 
    // pylint: disable=no-self-use
    def forward(self, score_fake):
        loss_fake = F.mse_loss(score_fake, score_fake.new_ones(score_fake.shape))
        return loss_fake


class HingeGLoss(nn.Module):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


Project Name: mozilla/TTS
Commit Name: 4326582bb1e68480ef79a02abbf4bfacc3aadede
Time: 2019-03-06
Author: egolge@mozilla.com
File Name: layers/losses.py
Class Name: MSELossMasked
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: MSEGLoss
Method Name: forward