clementfarabet / async

An async framework for Lua/Torch.
116 stars 35 forks source link

unknown object' error in the 'readObject' function while loading .net file in TORCH #26

Open janethalina opened 8 years ago

janethalina commented 8 years ago

Our system is running ubuntu 14.04 We've installed torch7, when we execute: t7> network = torch.load('cifar.net') (cifar.net is a neural network file)

we get this error: th>network= torch.load('cifar.net') /home/mijail/torch/install/share/lua/5.1/torch/File.lua:294: unknown object stack traceback: [C]: in function 'error' /home/mijail/torch/install/share/lua/5.1/torch/File.lua:294: in function </home/mijail/torch/install/share/lua/5.1/torch/File.lua:190> [C]: in function 'read' /home/mijail/torch/install/share/lua/5.1/torch/File.lua:270: in function 'readObject' /home/mijail/torch/install/share/lua/5.1/torch/File.lua:288: in function 'readObject' /home/mijail/torch/install/share/lua/5.1/torch/File.lua:272: in function 'readObject' /home/mijail/torch/install/share/lua/5.1/torch/File.lua:311: in function 'load' [string "network= torch.load('cifar.net')"]:1: in main chunk [C]: in function 'xpcall' /home/mijail/torch/install/share/lua/5.1/trepl/init.lua:648: in function 'repl' ...jail/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk [C]: at 0x00406670

soumith commented 8 years ago

you need to first do: require 'nn'

before the line torch.load(...)

janethalina commented 8 years ago

yes, it works =), thanks answer me, but i have a new problem in your example of torch-android

https://github.com/soumith/torch-android/tree/master/android-demo-cifar/appication/assets

I cant load 'cifar.net' of your demo example . All the system in Android works very good, but when i tryed to put my new data (cifar network), it doesnt work =(.

Can you help me with that?

mijailronald23 commented 8 years ago

I have the same problem with Torch-Android

https://github.com/soumith/torch-android/issues/13

Any idea?