Skip to content

Need minus sign in reverse log density computation #16

@jaanli

Description

@jaanli

return u, -a.sum(-1, keepdim=True)

This currently matches

return x, -a.sum(-1, keepdim=True)
- but L114 should have no minus sign for the log determinant of the Jacobian.

The forward computation is on

u = (inputs - m) * torch.exp(-a)

u = (inputs - m) * torch.exp(-a)

The inverse of this is

inputs = u * torch.exp(a) + m

So the log determinant jacobian of the inverse is a.sum(-1, keepdim=True) not -a.sum(-1, keepdim=True).

Might be missing something here!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions