chaiyujin / glow-pytorch

pytorch implementation of openai paper "Glow: Generative Flow with Invertible 1×1 Convolutions"
MIT License
507 stars 80 forks source link

Version of Python and Pytorch? Using not for images? #8

Closed malbergo closed 5 years ago

malbergo commented 5 years ago

Hi there,

I am just wondering what version of python and pytorch you used for this so I can be on the same page.

Also, would there need to be significant changes to the code base to have this work on 1D datasets of length 8, other than updating the json from [64,64,3] to [8,1]?

Thanks, Michael

chaiyujin commented 5 years ago

@malbergo Hi, I was using python3.6 and pytorch0.4.1. For 1d input, you may have to change some codes. I think it’s better to set as (1,8,1). Then you need to check the kernel size to fit your input size.

I recently change some codes for numeric stability without testing, because I’m focusing on other projects. You might have to try the pretrained model first to ensure correctness of current code. Sorry about that.

malbergo commented 5 years ago

Ok, thanks a bunch. I'm not exactly sure how the squeezing operation works when the structure is not H x W x C. If you have any insight on that, that would be great.

chaiyujin commented 5 years ago

Currently, squeeze2d use same factor to squeeze H and W. Since your input has H == 1, W == 8, you can set factor separately. For example H_factor=1 and W_factor=2

chaiyujin commented 5 years ago

@malbergo I close this issue. Please feel free to reopen if necessary.