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

A question about the potential normalization #4

Open
speedcell4 opened this issue Jan 17, 2021 · 0 comments
Open

A question about the potential normalization #4

speedcell4 opened this issue Jan 17, 2021 · 0 comments

Comments

@speedcell4
Copy link

speedcell4 commented Jan 17, 2021

Hi, thank you for sharing your source code.
Could you please give more explanation why do you need the potential normalization, the only description about it that I can find in your paper is the following,

Potential normalization (PN) is simple: we normalize the scores s to an empirical distribution of zero mean and one variance. The difference with batch-norm (BN) is that we apply PN at an instance-level, rather than a batch-level.

But I am still confused about what it is for. It's just for numerical stability?

And is the following the implementation of potential normalization?

if (self.potential_normalization):
lp_mean = log_potentials.reshape(batch_size, -1).mean(-1)
lp_std = log_potentials.reshape(batch_size, -1).std(-1)
log_potentials = log_potentials - lp_mean.view(batch_size, 1, 1, 1)
log_potentials = log_potentials / lp_std.view(batch_size, 1, 1, 1)

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