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

Small typo in tutorial notebook on Normalizing Flows #3176

Closed
felixschltr opened this issue Feb 1, 2023 · 1 comment
Closed

Small typo in tutorial notebook on Normalizing Flows #3176

felixschltr opened this issue Feb 1, 2023 · 1 comment
Labels
documentation help wanted Issues suitable for, and inviting external contributions

Comments

@felixschltr
Copy link
Contributor

Hi,

there seems to be a small typo in the tutorial notebook on normalizing flows in section "Fixed Univariate Transforms in Pyro".

The log-absolute derivative of the exponential transform $y = g(x) = \exp(x)$ is stated as $\log(\vert\frac{dg}{dx}\vert)=y$ while it should rather be $\log(\vert\frac{dg}{dx}\vert)=x$ (see also the implementation of torch.distributions.transforms.ExpTransform).

@felixschltr felixschltr changed the title Samll typo in tutorial notebook on Normalizing Flows Small typo in tutorial notebook on Normalizing Flows Feb 1, 2023
@fritzo fritzo added help wanted Issues suitable for, and inviting external contributions documentation and removed help wanted Issues suitable for, and inviting external contributions labels Feb 1, 2023
@fritzo
Copy link
Member

fritzo commented Feb 1, 2023

Yes, I think you're right:

g(x) = exp(x)
dg/dx = d/dx exp(x)
      = exp(x)
      > 0
|dg/dx| = dg/dx
        = exp(x)
log(|dg/dx|) = x

Typo fix is welcome 😄 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation help wanted Issues suitable for, and inviting external contributions
Projects
None yet
Development

No branches or pull requests

2 participants