How to change default path to save pre-trained model weights

(John Richmond) #1

I have limited space in my home directory and would like to change the path fastai saves pre-trained model weights. I recall seeing how to do it somewhere but can’t find it, can anybody help?

Thanks

0 Likes

#2

fastai only downloads a pretrained model in NLP, the other models are downloaded by PyTorch. For fastai, you can specify the location you want in .fastai/config.yml in your home dir. PyTorch has a similar feature I think.

2 Likes

(John Richmond) #3

Thanks, I found that in Pytorch you can control where the models are saved by setting the environmental variable $TORCH_HOME

This is useful and can be set either in your .profile file or using %env TORCH_HOME=’/directory_path’

0 Likes