-
Notifications
You must be signed in to change notification settings - Fork 6
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
Transform the MAF layer into an IAF layer #2
Comments
I think what's you said is right. By the way, can you tell me how you run the 'test.py' code? The 'data.loader' module used in this code is not included in this github code, I don't know how to test the trained model. |
Unfortunately I did not run this code. I only looked at it for reference when building my own. I think this is just a function which loads the given dataset (as string) with the given batch_size. So your best bet is to write one yourself. Since he is testing with mnist you can just load mnist into a normal pytorch data loader with the given batch and test it. |
Thanks very much! I will try it my own. |
Hi Edvard,
I need to invert a MAF layer (using another flow function and not an affine one), however I am having issues grasping the concept of it.
So:
(x - mu) * torch.exp(0.5 * logp)
in your code.mu[:, dim] + u[:, dim] * torch.exp(mod_logp[:, dim])
.Now if I invert that layer by saying forward = backward and backward=forward. Then I have f in the forward pass and f^{-1} in the backward. Is this the way to obtain an IAF?
The text was updated successfully, but these errors were encountered: