|
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!
pytorch-flows/flows.py
Line 114 in 34a34a0
This currently matches
pytorch-flows/flows.py
Line 130 in 34a34a0
The forward computation is on
pytorch-flows/flows.py
Line 113 in 34a34a0
u = (inputs - m) * torch.exp(-a)The inverse of this is
inputs = u * torch.exp(a) + mSo the log determinant jacobian of the inverse is
a.sum(-1, keepdim=True)not-a.sum(-1, keepdim=True).Might be missing something here!