赞
踩
C:\Users\xxx\.cache\torch\hub\checkpoints\
xxx
替换为你的用户名。
迁移学习的时候一般需要用到预训练模型,那么预训练模型的保存位置是在哪呢?
from torchvision import models
model = models.vgg19(pretrained=True)
这里以VGG19
为例,只要把pretrained
参数设置为True
就会下载模型,而模型的保存位置是在C盘用户目录下的\.cache\torch\hub\checkpoints\
。
Downloading: "https://download.pytorch.org/models/vgg19-dcbb9e9d.pth" to C:\Users\ghgxj\.cache\torch\hub\checkpoints\vgg19-dcbb9e9d.pth
关于PyTorch
中迁移学习的教程可以看我的这篇文章。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。