Torch load model from gpu to cpu, so can convert to pytorch

来源:互联网 发布:东芝移动硬盘 mac 加密 编辑:程序博客网 时间:2024/06/04 17:40

安装

load and save

lua -i 开启交互式界面
require 导入包
‘torch’ : load
Sequential :’nn’ ‘cunn’ 根据提示的缺少来添加

from gpu to cpu
m = torch.load(‘xxxx.t7’)
cudnn.conver(m,nn)
m = m:float()
torch.save(‘xxxx.cpu.t7’,m)

convert to pytorch

阅读全文
0 0
原创粉丝点击