Torch7: load ***.t7 model , i got some error

Created on 11 Jul 2017  路  3Comments  路  Source: torch/torch7

require 'nn'
require 'cunn'
require 'torch'
require 'cutorch'
require 'cudnn'

th> m =torch.load('***.t7')

then the error like this:

torch_install/torch/install**/Fiule.lua unknow torch class stack traceback:
anyone know why? thanks~

Most helpful comment

It is because your model uses 'nngraph' but you did not require it before loading.

All 3 comments

It is because your model uses 'nngraph' but you did not require it before loading.

thanks, @albanD it works~

@albanD @visonpon so well what is the correct way load the model?
Which parameter or settings I should change?
Thanks in advance...

UPDATE

require 'nn'
require 'cunn'
require 'torch'
require 'cutorch'
require 'cudnn'
require 'nngraph'
m = torch.load('xxxxx.t7')

has worked for me! :smile:

Was this page helpful?
0 / 5 - 0 ratings