python numpy加载火炬模型.t7文件

时间:2018-12-11 12:51:09

标签: python numpy torch

我有一个torch7模型,我需要使用numpy在python中加载模型,我试图用

加载模型
parameters = np.load("model")

但是我得到了错误

Traceback (most recent call last):
File "loadTorchModel.py", line 7, in <module>
params = np.load('Mnist_ascii')
File "/home/mht/.local/lib/python2.7/sitepackages/numpy/lib/npyio.py", line 443, in load
"Failed to interpret file %s as a pickle" % repr(file))
IOError: Failed to interpret file 'Mnist_ascii' as a pickle

反正我可以在python中加载.t7模型并将其转换为numpy数组吗?

0 个答案:

没有答案