Coder Social home page Coder Social logo

real-nvp's People

Contributors

chrischute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

real-nvp's Issues

What is the exact meaning of 'alt_order=True'?

Hello,
Thanks for your elegant implementation. But I find it hard to understand what 'alt_order=True' means in squeeze_2x2 function. The tensor operations are really comfusing. Could you explain it in a more intutive way? And does it corresponds to any text in the origin paper?

Thanks.

Clarification regarding coupling layer implementation

I'm not sure if I'm misunderstanding the code, but in line 49 in coupling_layer.py, why is the masking applied before we take exp_s? Wouldn't s.exp() just set the values that are 0 to 1 in this case, meaning that no part of the affine scaling is masked out?

Algorithm implementation

In coupling_layer, the reverse procedure is
if reverse:
x = x * inv_exp_s - t,
else:
x = (x + t) * exp_s

Why do you use -t for these two equations?

Best wishes

Synthetic Data I Generated is Rotated

Hi,

Thank you so much for the wonderful code. I am new to this area and I want to use RNVP method to learn the joint probability of digit images. I tried MNIST dataset and the samples I got are rotated digits. For example, I would get 3 and E. Some images is vertically symmetrical.

It seems like there is a data augmentation process. However, I do not know why it happens. Hope this question will not bother you too much.

Mistake in implementation

Thanks for a great job and your implementation of ReavNVP.
I think there is a mistake in the implementation of reverse pass of RealNVP, since inversion of RealNVP layer should give $x_2 = (y_2 - t(y_1)) \odot \exp(-s(y_1))$, i.e in the line:

x_change = x_change * inv_exp_s - t

One would rather expect x = (x - t) * inv_exp_s

Training stop with error

Hi, I tried to follow the instruction and run the training example but at the end of Epoch0 I got the following error message. I followed the Conda environment set-up in the instruction. I am wondering if you know what caused this issue. Thanks!

Traceback (most recent call last):
File "train.py", line 152, in
main(parser.parse_args())
File "train.py", line 63, in main
test(epoch, net, testloader, device, loss_fn, args.num_samples)
File "train.py", line 132, in test
torchvision.utils.save_image(images_concat, 'samples/epoch_{}.png'.format(epoch))
File "/home/mx83/anaconda3/envs/rnvp/lib/python3.7/site-packages/torchvision/utils.py", line 102, in save_image
ndarr = grid.mul(255).clamp(0, 255).byte().permute(1, 2, 0).cpu().numpy()
RuntimeError: PyTorch was compiled without NumPy support

What is the value of the loss?

Thanks for your work!
But I have a question about the value of loss, the loss of my trained model after 100 epochs is 7.33e+3 while the loss of the first epoch is 9.91e+3, is it unnormal? And is it means the likelihood is -loss, e.g., -9.91e+3?
By the way, as the loss decrease, bpd is also decrease from bpd=4.65 to bpd=3.44.
Can you tell me the value of your loss?

CUDA version

Hi, can I ask what is the cuda version for this repo?

I have a question for _pre_process in a class RealNVP

Hello, I have a question for a function _pre_process.

In the original paper, author preprocessed CIFAR this way. y = alpha + (1 - alpha) * x / 256 (alpha = 0.05, *: elementwise multiplication)

In your code, formula seems a bit different from the original paper like this. y = log({0.5 + x/256 * alpha - alpha / 2} / {0.5 - x/256 * alpha + alpha / 2}). (alpha = 0.9)

I want to know if there is a reason you used different preprocessing.

Thank you for wonderful code and sorry for my pool English.

(I think it's because log(x / 1-x) is inverse function of sigmoid, so I close this issue)

why loss is so high?

I am training your code on cifar10 dataset, the loss is very high.. it feels kinda odd.
is there anything wrong with the code? Could you please check once?

the avg loss per epoch is in the range of 7k-8k, though I am at the initial epochs, still, it seems a bit odd..
I am fairly new in this area.. so I would appreciate your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.