-
Notifications
You must be signed in to change notification settings - Fork 103
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
how can i fix errors when run "th convert.lua"? #20
Comments
"luarocks install npy4th" worked for me. |
Facing the same issue, I tried both building npy4th from source and installing with luarocks: Method 2 Getting this error: /tmp/luarocks_npy4th-1.3-3-1149/npy4th/npy4th.cpp:213:1: error: elements of array ‘const luaL_reg npyth []’ have incomplete type Error: Build error: Failed building. |
Solved it by using this AMI in AWS: https://github.com/bitfusionio/amis/blob/master/awsmrkt-bfboost-ubuntu14-cuda75-torch/ |
How to solve this if you are not using AWS? |
No idea, sorry |
How do i fix this when running
|
try reinstall torch ref: http://torch.ch/docs/getting-started.html git clone https://github.com/torch/distro.git ~/torch --recursive God bless you. |
did you find any fix? |
Needed to change the path of .t7 file in torch.save command in convert.lua file. |
Please attach a PR for the same |
Hi, I also have issue launching 'th convert.lua'; I got the following message '/usr/bin/luajit: /usr/share/lua/5.1/trepl/init.lua:389: module 'npy4th' not found:' 'Missing dependencies for npy4th 1.3-3: npy4th 1.3-3 depends on xlua >= 1.0 (not installed) Error: Could not satisfy dependency xlua >= 1.0: No results matching query were found. ' Do you know how to handle that? Thanks! |
Hello!
When i run this code received followed error:
"th convert.lua"
/ home/my/torch/install/bin/lua: /home/my/torch/install/share/lua/5.2/trepl/init.lua:389: module 'npy4th' not found:No LuaRocks module found for npy4th
no field package.preload['npy4th']
no file '/home/my/.luarocks/share/lua/5.2/npy4th.lua'
no file '/home/my/.luarocks/share/lua/5.2/npy4th/init.lua'
no file '/home/my/torch/install/share/lua/5.2/npy4th.lua'
no file '/home/my/torch/install/share/lua/5.2/npy4th/init.lua'
no file '/home/my/code/torch/install/share/lua/5.2/npy4th.lua'
no file '/home/my/code/torch/install/share/lua/5.2/npy4th/init.lua'
no file '/home/my/code/torch/install/lib/lua/5.2/npy4th.lua'
no file '/home/my/code/torch/install/lib/lua/5.2/npy4th/init.lua'
no file './npy4th.lua'
no file '/home/my/.luarocks/lib/lua/5.2/npy4th.so'
no file '/home/my/torch/install/lib/lua/5.2/npy4th.so'
no file '/home/my/torch/install/lib/npy4th.so'
no file '/home/my/code/torch/install/lib/npy4th.so'
no file '/home/my/code/.luarocks/lib/lua/5.2/npy4th.so'
no file '/home/my/code/torch/install/lib/lua/5.2/npy4th.so'
no file '/home/my/code/torch/install/lib/lua/5.2/loadall.so'
no file './npy4th.so'
stack traceback:
[C]: in function 'error'
/home/my/torch/install/share/lua/5.2/trepl/init.lua:389: in function 'require'
convert.lua:1: in main chunk
[C]: in function 'dofile'
...aran/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?
Also i try to setup npy4th by this commands:
"git clone https://github.com/htwaijry/npy4th.git
cd npy4th
luarocks make"
but receive these errors:
cmake -E make_directory build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/my/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/my/torch/install/lib/luarocks/rocks/npy4th/1.3-3";
make
"-- Found Torch7 in /home/my/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/my/npy4th/build
[ 50%] Built target cnpy
[ 75%] Building CXX object CMakeFiles/npy4th.dir/npy4th.cpp.o
/home/my/npy4th/npy4th.cpp: In function ‘void load_array_to_lua(lua_State*, cnpy::NpyArray&)’:
/home/my/npy4th/npy4th.cpp:37:33: warning: ‘const char* luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.FloatTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:37:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.FloatTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:37:77: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.FloatTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:43:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.DoubleTensor"))
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:43:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.DoubleTensor"))
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:43:78: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.DoubleTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:50:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ByteTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:50:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ByteTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:50:76: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ByteTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:56:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ShortTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:56:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ShortTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:56:77: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.ShortTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:62:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.IntTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:62:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.IntTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:62:75: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.IntTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:68:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.LongTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:68:33: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.LongTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp:68:76: warning: ‘const char luaT_checktypename2id(lua_State*, const char*)’ is deprecated [-Wdeprecated-declarations]
luaT_pushudata(L, tensor, luaT_checktypename2id(L, "torch.LongTensor"));
^
In file included from /home/my/npy4th/npy4th.cpp:12:0:
/home/my/torch/install/include/luaT.h:132:38: note: declared here
LUAT_API LUAT_DEPRECATED const char* luaT_checktypename2id(lua_State L, const
^
/home/my/npy4th/npy4th.cpp: At global scope:
/home/my/npy4th/npy4th.cpp:213:1: error: elements of array ‘const luaL_reg npyth []’ have incomplete type
};
^
/home/my/npy4th/npy4th.cpp:213:1: error: storage size of ‘npyth’ isn’t known
/home/my/npy4th/npy4th.cpp: In function ‘int luaopen_libnpy4th(lua_State)’:
/home/my/npy4th/npy4th.cpp:216:40: error: ‘luaL_openlib’ was not declared in this scope
luaL_openlib(L, "libnpy4th", npyth, 0);
^
CMakeFiles/npy4th.dir/build.make:62: recipe for target 'CMakeFiles/npy4th.dir/npy4th.cpp.o' failed
make[2]: *** [CMakeFiles/npy4th.dir/npy4th.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/npy4th.dir/all' failed
make[1]: *** [CMakeFiles/npy4th.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Error: Build error: Failed building."
How can I fix it and run this model?
Please help me.
Thanks very much.
The text was updated successfully, but these errors were encountered: