我已经执行了neuralnetwork_tutorial.lua。现在我有了模型,我想用我自己的一些手写图像来测试它。但是我已经尝试了很多方法来存储权重,现在通过使用torch save 和 load 方法存储完整的模型。
但是现在我尝试使用预测我自己的手写图像(转换为 28X28 DoubleTensor)model:forward(testImageTensor)
...ches/torch/install/share/lua/5.1/dp/model/sequential.lua:30: attempt to index local 'carry' (a nil value)
stack traceback:
...ches/torch/install/share/lua/5.1/dp/model/sequential.lua:30: in function '_forward'
...s/torches/torch/install/share/lua/5.1/dp/model/model.lua:60: in function 'forward'
[string "model:forward(testImageTensor)"]:1: in main chunk
[C]: in function 'xpcall'
...aries/torches/torch/install/share/lua/5.1/trepl/init.lua:588: in function 'repl'
...ches/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk
[C]: at 0x0804d650