Jupyter+pytorch, or cuda memory help: stop notebook mid training

Unable to Run lesson1 notebook with pytorch 0.4

OK, so I decided to clone my conda environment on my Linux box and build the 0.4 library from the source master at https://github.com/pytorch/pytorch#from-source, built like a charm, but when I ran lesson1.ipynb i got the following warnings and error:

Not sure if there’s a more stable version of 0.4 with fastai somewhere or if I should pursue this.

I’ve been compiling from source.

git pull should fix that - I fixed it a couple of days ago.

And indeed the GIT pull did fix it. Onward and upward.
Thanks

1 Like

Hi All,
I was having this same issue and was getting frustrated having to keep starting the kernel. I’ve resolved it by this doing this:

del name_of_model
torch.cuda.empty_cache()

Sadly it took me a while to realise you need to delete your model before clearing the cache. Also don’t forget to save the model before deleting :slight_smile:

1 Like