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? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
audiocraft/audiocraft/adversarial/losses.py
Lines 217 to 223 in adf0b04
The feat_scale isn't used in training. Maybe the correct is:
def forward(self, fmap_fake: tp.List[torch.Tensor], fmap_real: tp.List[torch.Tensor]) -> torch.Tensor: assert len(fmap_fake) == len(fmap_real) and len(fmap_fake) > 0 feat_loss = torch.tensor(0., device=fmap_fake[0].device) feat_scale = torch.tensor(0., device=fmap_fake[0].device) n_fmaps = 0 for (feat_fake, feat_real) in zip(fmap_fake, fmap_real): assert feat_fake.shape == feat_real.shape n_fmaps += 1 feat_loss += self.loss(feat_fake, feat_real) feat_scale += torch.mean(torch.abs(feat_real)) feat_loss /= feat_scale if self.normalize: feat_loss /= n_fmaps return feat_loss
The text was updated successfully, but these errors were encountered:
No branches or pull requests
audiocraft/audiocraft/adversarial/losses.py
Lines 217 to 223 in adf0b04
The feat_scale isn't used in training. Maybe the correct is:
The text was updated successfully, but these errors were encountered: