fastai / fastbook

The fastai book, published as Jupyter Notebooks
Other
21.51k stars 8.33k forks source link

Calls to fine_tune() in Chapter 1 & 2 give warnings and Kernel needs to restart #581

Closed makestuff4fun closed 1 year ago

makestuff4fun commented 1 year ago

Code: learn = vision_learner(dls, resnet18, metrics=error_rate) learn.fine_tune(4)

Warnings: /home/brian/miniconda3/envs/jupyter/lib/python3.11/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( /home/brian/miniconda3/envs/jupyter/lib/python3.11/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=ResNet18_Weights.IMAGENET1K_V1. You can also use weights=ResNet18_Weights.DEFAULT to get the most up-to-date weights. warnings. Warn(msg)

Image Showing where it crashes. image

This is where the kernel crashes every time I run the code. Any help would be very much appreciated. This running on a local Jupyter in WSL2.

makestuff4fun commented 1 year ago

For anyone who comes across this, I did manage to get it working. See the below solution. https://discuss.pytorch.org/t/jupyter-kernel-dies-when-using-cuda-wsl-2-ubuntu/169546 https://github.com/microsoft/WSL/issues/8587#issuecomment-1229170859

makestuff4fun commented 1 year ago

I still have the warnings, but at least it's not crashing and I use the notebooks normally