pclucas14 / pixel-cnn-pp

Pytorch Implementation of OpenAI's PixelCNN++
Other
345 stars 76 forks source link

Loading pretrained model #14

Closed arunesh-mittal closed 4 years ago

arunesh-mittal commented 4 years ago

Hi Lucas!

Thanks so much for sharing this implementation! :)

Ran into a snag while loading the pre-trained model. Seems like the pretrained models were saved using DataParallel so naively loading the model throws error. Just calling model = torch.nn.DataParallel(model) and then calling load_part_of_model fixes the issue.

It's a minor thing but just in case others run into the same issue.

Best,

pclucas14 commented 4 years ago

Hi,

thanks for flagging this! I'll fix this soonish. I'll leave the issue open until then

-Lucas