pytorch
caijh33
双鸭山大学研究僧
展开
-
PyTorch加载预训练模型
Pytorch调用预训练模型:1Pytorch保存和加载整个模型: torch.save(model, 'model.pth') model = torch.load('model.pth')Pytorch保存和加载预训练模型参数: torch.save(model.state_dict(), 'params.pth') model.load_state_dict(torc...原创 2018-11-15 20:27:54 · 15334 阅读 · 1 评论 -
PyTorch fine-tuning
。。。原创 2018-11-19 21:49:49 · 257 阅读 · 0 评论 -
Pyorch计算模型参数
介绍一个简单计算模型参数的API,实现模型参数的快速计算使用方法:pip install torchsummary原创 2019-03-20 17:52:02 · 390 阅读 · 0 评论 -
PyTorch使用多GPU训练
1. PyTorch使用指定GPU训练model = Model()if torch.cuda.is_available(): model = model.cuda()上面代码直接使用model.cuda(), PyTorch默认使用从0开始的GPU, 有如下两种方法来指定需要使用的GPU:直接在终端中设定:CUDA_VISIBLE_DEVICES=1 python main....原创 2019-04-18 19:16:47 · 11424 阅读 · 1 评论 -
下载PyTorch
根据CUDA以及Python版本修改即可http://download.pytorch.org/whl/cu80/torch-0.4.0-cp35-cp35m-linux_x86_64.whl原创 2019-04-18 20:24:54 · 3267 阅读 · 0 评论 -
Ubunt配置深度学习环境
1. 安装anaconda原创 2019-04-20 01:59:43 · 192 阅读 · 0 评论