Skip to content
New issue

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

why std.sqrt() is performed twice in utterance_mvn? #20

Open
lastsongforu opened this issue Jan 12, 2022 · 0 comments
Open

why std.sqrt() is performed twice in utterance_mvn? #20

lastsongforu opened this issue Jan 12, 2022 · 0 comments

Comments

@lastsongforu
Copy link

I notice in utterance_mvn(), if norm_means is True, then std.sqrt() is performed twice?
is there any explanation?

if norm_means:
        x -= mean

        if norm_vars:
            var = x.pow(2).sum(dim=1, keepdim=True) / ilens_
            std = torch.clamp(var.sqrt(), min=eps)
            x = x / std.sqrt()
        return x, ilens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant