-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Description
I am trying to print the torch model options of training, I have used the provided model model.t7
I am using this code to print the option
require 'torch'
require 'nn'
require 'InstanceNormalization'
--[[
Prints the options that were used to train a a feedforward model.
--]]
local cmd = torch.CmdLine()
cmd:option('-model', 'models/instance_norm/candy.t7')
local opt = cmd:parse(arg)
print('Loading model from ' .. opt.model)
local checkpoint = torch.load(opt.model)
for k, v in pairs(checkpoint.opt) do
if type(v) == 'table' then
v = table.concat(v, ',')
end
print(string.format('%s: %s', k, v))
end
but I am getting this error:
/src/torch/install/bin/luajit: print_options.lua:22: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
print_options.lua:22: in main chunk
[C]: in function 'dofile'
.../src/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670
Metadata
Metadata
Assignees
Labels
No labels