Closed changhai0551 closed 6 years ago
I met the same problem when I ran "th train.lua" of the Parallel-Jaw-Grasping. Did you work it out?
Does adding require 'util'
to the top of DataLoader.lua
fix your problem?
@andyzeng It doesn't work. The problems are same as before. Which version of lua are you using?
@changhai0551 Does it fix your problem?
@andyzeng @mzh19940817 It doesn't work for me either. The problems are same as before.
I don't know the reason for the error, but just copying the required functions in util.lua to train.lua is useful.
My Lua version is 5.1. I'm also unsure why getLinesFromFile
in util.lua
is not found. What's your OS, GPU, and Lua version? I will try to see if I can reproduce the error.
Just like changhai0551 said, it's useful to copy function "getLinesFromFile", "fileExists" and "shuffleTable" in util.lua to train.lua. It seems that require 'util' doesn't work. I'm running Ubuntu 16.04 with Quadro K620(2Gb) and my lua version is also 5.1. I have solved my problems by using other computer(GTX 1050Ti with 4Gb memories). I changed the batch size from 2 to 1 and I found it consumed 2483Mb's memories.
It turned out to be the small GPU's memory. But if I want to run it with my GPU, how to modify the network architecture from "resnet-101.t7" to "resnet-50.t7"? I got errors as follow.
Interesting, I wonder if this error is related to your previous one where the imports are not working properly. Does it work if you copy paste utils
and its functions from modelUtils.lua
into model.lua
?
It doesn't work. I'm ready to buy a new GPU card. Thanks for your help.
So I figured out why this was the problem. It seems to be that there is already a util library/package installed using luarocks. So when you require 'util' you are importing the 'util' package that you have installed, not the local util.lua file. This issue can be fixed by simply making the files to require 'util.lua' instead of only 'util'
When I run the training command th train.lua of the Suction-Based Grasping, it outputs the error as follows: /home/robot/Downloads/torch/install/bin/luajit: ./DataLoader.lua:22: attempt to call global 'getLinesFromFile' (a nil value) stack traceback: ./DataLoader.lua:22: in function '__init' ...bot/Downloads/torch/install/share/lua/5.1/torch/init.lua:91: in function <...bot/Downloads/torch/install/share/lua/5.1/torch/init.lua:87> [C]: in function 'DataLoader' train.lua:37: in main chunk [C]: in function 'dofile' ...oads/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405e40 how to fix the problem? Thanks!