connectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

Hey there!
I’m trying to train a vision model for the first time on my own computer. I used to train on google collab without problems, but recently I got a computer with an RTX 3070 and I want to use it.
I copied and pasted a working code I had on the collab, that uses a resnet50, and while downloading the pre-trained model it stops all the time with the error:

connectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

I’m doing:
learn = cnn_learner(dls, resnet50, metrics=error_rate)

It downloads to around 20-30% and then stops.

Does someone know why this might be happening and what I can do to fix it?
I thought about downloading the model by itself, like downloading a file from the internet, but don’t really know how to then properly load it to the project.

I would like to use a resnet152, I found it here:

Thanks to everyone in advance!

Hi @joao,
the learner should print something like this the first time you run it.

Downloading: “https://download.pytorch.org/models/resnet18-5c106cde.pth” to /root/.cache/torch/hub/checkpoints/resnet18-5c106cde.pth

One workaround would be to run this on google colab, download the resnet*.pth file and save it on your local machine in the folder that is mentioned when you instanciate cnn_learner (the output above is from kaggle and I’m pretty sure that on your local machine fastai is not using the folder /root/).

Hope this helps