-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Architecture issues with Torch.load #42
Comments
@ananghudaya - https://github.com/teradeep/demo-apps/issues/4 indicates this is an architecture issue, which is a problem with I've saved the model in ASCII format. Can you download and
Try loading it with:
If this works, I think you'll just need to replace
|
Thanks @bamos Still no luck in getting it right. I've downloaded and verified the ASCII model. Here is the output:
I'm using a 32-bit machine. |
Hi Anang, this error looks like Torch can't find the file. -Brandon.
|
Hi @bamos, Yes I did. the md5 checksum is similar, and I have placed the file in the same folder as the other models. |
Please double check the path to the model.
|
The ascii model loads in about 30-45 seconds for me and the x86 binary model loads in a few seconds. I'll add a fallback mechanism when we transition to a Lua server in #4 instead of a Lua subprocess so only non 64-bit x86 users will have the 30 second penalty, and it will only be for the first time they start the server, not every time they try to run a new Python program using OpenFace. |
i faced the same problem that torch cant load nn4.v1.ascii.t7. i downloaded nn4.v1.ascii.t7 and checked md5. as @bamos sayed it caused by incorrect path,but i tried absolutely path.it still showed that |
Hi @snowlord - strange! Can you (or @ananghudaya) try saving a small file in binary format, then loading it? Then doing the same with an ASCII-formatted file?
If this works, can you then try doing it in a different directory that's not your current working directory? |
hi,@bamos,i changed on the 64-bit x86,i have checked md5 of model file.it showed different problem.
|
Hi @snowlord - interesting you're seeing that on 64-bit x86. Somebody in this thread on the torch mailing list got a similar Does the ascii model work on your 64-bit x86 machine? |
Hi @bamos ,
As you can see I had tried to load the model that you provided at this link: when I tried to load the nn4.v1.t7 with no susses: I had done a md5sum test:
I'm on x86_64 GNU/Linux. Ilya |
It seems to be a problem of the lua and luajit versions: -bash-4.1# lua -v I use these versions. Which version the model was complied with? Ilya |
I use these versions. Which version the model was complied with?
lua: Not installed on my system
luajit: 2.1.0-alpha (from Torch)
|
I had installed LuaJIT 2.1.0-beta1. download from: make sure to add this option to the cmake "-DWITH_LUAJIT21=ON" !!!!!!!!!!!!! git clone https://github.com/torch/luajit-rocks.git |
Hi @bamos , Error getting result from Torch subprocess. Exception: could not convert string to float: stdout: stderr: I tried to run the same code in X86_64 platform it's all OK since ascii version should be platform independent. Could you give some hint about this issue I had on ARM 32 bit platform? Thanks. |
Hi @lijian8,
Are these both empty? I would expect more content.
I don't have any experience executing on 32-bit ARM. -Brandon. |
Hi @bamos, |
I had a very similar issue on Jetson TK1 board, here is a solution from another project that might help:
|
I had the same issue. It was fixed by the comment from SyRenity: git clone https://github.com/mvitez/torch7.git mvittorch7 |
@jacklanchantin glad it helped :) |
For information, torch/torch7#476 was merged into master some time ago, so all the changes in @mvitez branch were integrated to torch. |
Thanks @bamos @SyRenity @jacklanchantin, this issue should be fixed with instruction from @SyRenity . |
Great info, thanks all! |
@SyRenity i am also working on TK1 but still get error when I load the binary model for openface. As mentioned before this issue should be fixed. Do you have any clue about my errors. Thanks: net = torch.load('/home/ubuntu/Downloads/face/openface/models/openface/nn4.small2.v1.t7') |
Hi @ChrisYang - can you try using our ascii model from http://openface-models.storage.cmusatyalab.org/nn4.small2.v1.ascii.t7.xz? Unxz it and then use |
@bamos thanks for your prompt reply. |
@shimen Hi, I have the same problem as you, "File.lua failed to load function from bytecode binary string: not a precompiled chunk", and I also updated my luajit version to be 2.1 beta, but it still failed, I don't what to do now? Could anyone help? Thanks. |
@apeterswu Hi, I'm not sure what is the problem. Since openFace version 0.2 I do not have to use this command. |
Subject: openface OpenFace:
is anyone encountered such a problem? my email is 329410527@qq.com Thank you very much. |
Some users following this issue may also be interested in helping improve dlib and its face detector's speed on ARM by adding NEON instructions. Contact @davisking if interested. Here is his comment from another thread:
|
Hey @bamos, I've been trying to use the Docker container in Ubuntu 14.04 on 64 bit x86 architecture. I have switched to the ascii model and I'm getting the same error as weiqifa0 above. I'm not quite sure where to go from here other than performing a fresh by hand install of Openface, which I want to avoid. Any suggestions would be great! Exception in thread frame_process_thread_0: OpenFace:
Diagnostic information: cmd: ['/usr/bin/env', 'th', '/usr/local/lib/python2.7/dist-packages/openface/openface_server.lua', '-model', '/host/system/../models/openface/nn4.small2.v1.ascii.t7', '-imgDim', '96'] |
Don't worry just tested with Docker in a Ubuntu VM and worked perfectly :) not sure what the issue was. |
hey @bamos, $ th but again when i try this `command ./demos/classifier.py infer ./generated-embeddings/classifier.pkl your_test_image.jpg this is the error i am getting /home/pi/torch/install/share/lua/5.1/torch/File.lua:375: unknown object
|
Had the same issue on ubuntu 16.04 | torch7. The ascii loading method worked with the provided ascii model download link. Just had to modify the ./batch-represent/opt.lua and main.lua file that the model gets loaded from in the example on the openface website for testing classification. However trying to run the ./demo/compare.py example that uses the openface python api suffers the same error. It seems if the torch_neural_net.py file's cmd could accept an ascii option it might be a way to curtail it? -- update |
is it CNN |
real time and web based... |
had some issue ./demos/compare.py images/examples/{lennon*,clapton*} OpenFace:
Diagnostic information: cmd: ['/usr/bin/env', 'th', '/home/sct/miniconda3/envs/openface01/lib/python2.7/site-packages/openface/openface_server.lua', '-model', '/home/sct/CV/openface/demos/../models/openface/nn4.small2.v1.t7', '-imgDim', '96'] ============ stdout: |
From @ananghudaya in #26:
The text was updated successfully, but these errors were encountered: