phlippe / uvadlc_notebooks

Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2023
https://uvadlc-notebooks.readthedocs.io/en/latest/
MIT License
2.59k stars 590 forks source link

Tutorial 11 : Runtime error in train_flow function #54

Closed sy-eng closed 2 years ago

sy-eng commented 2 years ago

Thank you for your great tutorials!

I tried tutorial 11 on my laptop (it has no gpu.) and I got a runtime error in train_flow function. Its error message said map_location in torch.load should be set. So I modified ckpt = torch.load(pretrained_filename) to ckpt = torch.load(pretrained_filename, map_location=device).

I guess this modification is good for PCs without gpu.

Thank you.

phlippe commented 2 years ago

Hi @sy-eng, thanks for pointing this out and already preparing the solution! The new commit should now support loading the NFs on CPU. Thanks!

sy-eng commented 2 years ago

Thank you!