Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch error when run demo 2,3: table index is nil #141

Closed
trungdn opened this issue May 23, 2016 · 1 comment
Closed

Torch error when run demo 2,3: table index is nil #141

trungdn opened this issue May 23, 2016 · 1 comment

Comments

@trungdn
Copy link

trungdn commented May 23, 2016

I try to run demo on Raspberry Pi 3 - ARM but it got some error:

Context of the issue.

/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:370: table index is nil
stack traceback:
/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:370: in function 'readObject'
/home/trungdn/torch/install/share/lua/5.1/nn/Module.lua:158: in function 'read'
/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:351: in function 'readObject'
/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:409: in function 'load'
...lib/python2.7/dist-packages/openface/openface_server.lua:40: in main chunk
[C]: in function 'dofile'
...ngdn/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00014895
Traceback (most recent call last):
File "./demos/classifier.py", line 189, in
infer(args)
File "./demos/classifier.py", line 119, in infer
rep = getRep(img).reshape(1, -1)
File "./demos/classifier.py", line 78, in getRep
rep = net.forward(alignedFace)
File "/usr/local/lib/python2.7/dist-packages/openface/torch_neural_net.py", line 150, in forward
rep = self.forwardPath(t)
File "/usr/local/lib/python2.7/dist-packages/openface/torch_neural_net.py", line 107, in forwardPath
""".format(self.cmd, self.p.stdout.read()))
Exception:

OpenFace: openface_server.lua subprocess has died.

Diagnostic information:

cmd: ['/usr/bin/env', 'th', '/usr/local/lib/python2.7/dist-packages/openface/openface_server.lua', '-model', '/home/trungdn/openface/demos/../models/openface/nn4.small2.v1.t7', '-imgDim', '96']

stdout:

Steps to reproduce.

I try to follow the instruction on issue #42 about using 32bit manchine
th> require 'nn'
th> require 'dpnn'
th> net = torch.load('/openface/nn4.small2.v1.ascii.t7', 'ascii')
cannot open </openface/nn4.small2.v1.ascii.t7> in mode r at /home/trungdn/torch/pkg/torch/lib/TH/THDiskFile.c:649
stack traceback:
[C]: at 0x76baa051
[C]: in function 'DiskFile'
/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load'
[string "net = torch.load('/openface/nn4.small2.v1.asc..."]:1: in main chunk
[C]: in function 'xpcall'
/home/trungdn/torch/install/share/lua/5.1/trepl/init.lua:669: in function 'repl'
...ngdn/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: at 0x00014895

When I run profile-network.lua
/home/trungdn/torch/install/bin/luajit: cannot open <./models/openface/nn4.small2.v1.t7> in mode r at /home/trungdn/torch/pkg/torch/lib/TH/THDiskFile.c:649
stack traceback:
[C]: at 0x76af2051
[C]: in function 'DiskFile'
/home/trungdn/torch/install/share/lua/5.1/torch/File.lua:405: in function 'load'
profile-network.lua:27: in main chunk
[C]: in function 'dofile'
...ngdn/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00014895
trungdn@trungdn-desktop:~/openface/util$

Look like it can not find or open models file. But even with ascii models it still has the same issue.
I try to run those commands too but it stop in the middle

git clone https://github.com/mvitez/torch7.git mvittorch7
cd mvittorch7
luarocks make rocks/torch-scm-1.rockspec
lib/TH/CMakeFiles/TH.dir/build.make:134: recipe for target 'lib/TH/CMakeFiles/TH.dir/THTensor.c.o' failed
make[2]: *** [lib/TH/CMakeFiles/TH.dir/THTensor.c.o] Error 1
CMakeFiles/Makefile2:284: recipe for target 'lib/TH/CMakeFiles/TH.dir/all' failed
make[1]: *** [lib/TH/CMakeFiles/TH.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
lib/TH/CMakeFiles/TH_static.dir/build.make:134: recipe for target 'lib/TH/CMakeFiles/TH_static.dir/THTensor.c.o' failed
make[2]: *** [lib/TH/CMakeFiles/TH_static.dir/THTensor.c.o] Error 1
CMakeFiles/Makefile2:247: recipe for target 'lib/TH/CMakeFiles/TH_static.dir/all' failed
make[1]: *** [lib/TH/CMakeFiles/TH_static.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.

OS and hardware information.

  • Operating system: [todo] ARMv8
  • Torch version: [todo] LuaJIT 2.1.0-beta1
  • CPU architecture: [todo]
  • GPU type (if using): [todo]
@trungdn trungdn closed this as completed May 24, 2016
@gauravkaila
Copy link

@trungdn , what was the solution to your problem? I am facing similar issues while using Nvidia Jetson TX1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants