更改torchvision预训练模型保存路径
1. from torch.hub import load_state_dict_from_url as load_url
2. def load_state_dict_from_url(url, model_dir=None, map_location=None, progress=True, check_hash=False, file_name=None):
在python中输入第一行,然后跳转到 load_state_dict_from_url()函数,直接把model_dir的值改为你要保存的路径就好。(之前下载到默认路径的模型直接复制到新地址,再把默认路径的文件删了)