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

run th train.lua error ? #17

Open
swinghu opened this issue Nov 26, 2016 · 9 comments
Open

run th train.lua error ? #17

swinghu opened this issue Nov 26, 2016 · 9 comments

Comments

@swinghu
Copy link

swinghu commented Nov 26, 2016

running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class
trainCache	/Users/swinghu/prog/torch/pix2pix/cache/_Users_swinghu_prog_torch_pix2pix_datasets_facades_train_trainCache.t7
Creating train metadata
serial batch:, 	0
table: 0x03a7b698
running "find" on each class directory, and concatenate all those filenames into a single file containing all image paths for a given class
/tmp/lua_WkxyhE: line 1: gfind: command not found
/tmp/lua_BMi2XQ: line 1: gfind: command not found
now combine all the files to a single large file
now combine all the files to a single large file
load the large concatenated list of sample paths to self.imagePath
cmd..gwc -L '/tmp/lua_JNRyb3' |gcut -f1 -d' '
load the large concatenated list of sample paths to self.imagePath
cmd..gwc -L '/tmp/lua_Ho6Snl' |gcut -f1 -d' '
/Users/swinghu/torch/install/bin/luajit: .../swinghu/torch/install/share/lua/5.1/threads/threads.lua:264: 
[thread 2 callback] /Users/swinghu/prog/torch/pix2pix/data/dataset.lua:215: Could not find any image file in the given input paths
stack traceback:
	[C]: in function 'assert'
	/Users/swinghu/prog/torch/pix2pix/data/dataset.lua:215: in function '__init'
	/Users/swinghu/torch/install/share/lua/5.1/torch/init.lua:91: in function </Users/swinghu/torch/install/share/lua/5.1/torch/init.lua:87>
	[C]: in function 'dataLoader'
	/Users/swinghu/prog/torch/pix2pix/data/donkey_folder.lua:171: in main chunk
	[C]: in function 'dofile'
	/Users/swinghu/prog/torch/pix2pix/data/data.lua:39: in function </Users/swinghu/prog/torch/pix2pix/data/data.lua:29>
	[C]: in function 'xpcall'
	.../swinghu/torch/install/share/lua/5.1/threads/threads.lua:231: in function 'callback'
	...rs/swinghu/torch/install/share/lua/5.1/threads/queue.lua:65: in function <...rs/swinghu/torch/install/share/lua/5.1/threads/queue.lua:41>
	[C]: in function 'pcall'
	...rs/swinghu/torch/install/share/lua/5.1/threads/queue.lua:40: in function 'dojob'
	[string "  local Queue = require 'threads.queue'..."]:13: in main chunk
[thread 1 callback] /Users/swinghu/prog/torch/pix2pix/data/dataset.lua:215: Could not find any image file in the given input paths
stack traceback:

when i use my macbook pro,after download the datasets,run train the model
DATA_ROOT=~/prog/torch/pix2pix/datasets/facades name=facades_generation which_direction=BtoA gpu=0 cudnn=0 batchSize=10 save_epoch_freq=5 th train.lua , the error msg displaye, is lua version depended?
my version

lua -v
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
@junyanz
Copy link
Collaborator

junyanz commented Nov 27, 2016

The error is "cannot find any image file in the given directory". Could you make sure that you set the image directory DATA_ROOT correctly?

@kenn
Copy link

kenn commented Dec 16, 2016

Same here, fresh install following the README on the latest MacBook Pro.

DATA_ROOT=./datasets/facades name=facades_generation which_direction=BtoA th train.lua

fails with the same error, and I confirmed ls ./datasets/facades returns test/ train/ val/.

@Flipajs
Copy link

Flipajs commented Dec 16, 2016

I had the same problem.
Adding env before whole command hleped.

env DATA_ROOT=./datasets/facades name=facades_generation which_direction=BtoA th train.lua

@kenn
Copy link

kenn commented Dec 16, 2016

Ah, there was an obscure error before that:

/tmp/lua_f46sBl: line 1: gfind: command not found

So I installed gfind with brew install findutils and this issue was solved. (You might also need to install coreutils as well)

Maybe install script needs to take care of this?

@kenn
Copy link

kenn commented Dec 16, 2016

I had another error saying module 'cunn' not found:No LuaRocks module found for cunn after this and I had to:

luarocks install clnn

Then I had another error that says

Please install cltorch from https://github.com/hughperkins/distro-cl

and lastly I found this:

$ git clone --recursive https://github.com/hughperkins/distro -b distro-cl ~/torch-cl
$ cd ~/torch-cl
$ bash install-deps
Already up-to-date.
Warning: readline is a keg-only and another version is linked to opt.
Use `brew install --force` if you want to install this version
Warning: cmake-3.7.1 already installed
Warning: wget-1.18 already installed
Error: git-2.10.2 already installed
To install this version, first `brew unlink git`
qt: This formula either does not compile or function as expected on macOS
versions newer than El Capitan due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.

So it won't work on macOS Sierra yet? :(

@ilsang
Copy link

ilsang commented Dec 26, 2016

I'm newbie.
I had same error when set path contains tif image files.
But when I set path contains jpg image files, there wasn't problem.
Is it impossible to import tif image files?

@junyanz
Copy link
Collaborator

junyanz commented Dec 27, 2016

Hi ilsang, It seems that "image.load" doesn't work for TIF format. You can find a related discussion at stackoverflow. You can also convert TIF to JPG/PNG offline.

@ashleyjamesbrown
Copy link

ashleyjamesbrown commented Jun 27, 2017

Im having same issue with gfind and gwc but installing coreutils throws up an error installing (findutils seems to install ok)

Last 15 lines from /Users/ashleybrown/Library/Logs/Homebrew/coreutils/03.make:
 src/ginstall -c -m 644 'man/unlink.1' '/usr/local/Cellar/coreutils/8.27/share/man/man1/gunlink.1'
  src/ginstall -c src/uniq '/usr/local/Cellar/coreutils/8.27/bin/./guniq'
 src/ginstall -c -m 644 'man/vdir.1' '/usr/local/Cellar/coreutils/8.27/share/man/man1/gvdir.1'
  src/ginstall -c src/unlink '/usr/local/Cellar/coreutils/8.27/bin/./gunlink'
 src/ginstall -c -m 644 'man/wc.1' '/usr/local/Cellar/coreutils/8.27/share/man/man1/gwc.1'
  src/ginstall -c src/vdir '/usr/local/Cellar/coreutils/8.27/bin/./gvdir'
 src/ginstall -c -m 644 'man/whoami.1' '/usr/local/Cellar/coreutils/8.27/share/man/man1/gwhoami.1'
  src/ginstall -c src/wc '/usr/local/Cellar/coreutils/8.27/bin/./gwc'
  src/ginstall -c src/whoami '/usr/local/Cellar/coreutils/8.27/bin/./gwhoami'
 src/ginstall -c -m 644 'man/yes.1' '/usr/local/Cellar/coreutils/8.27/share/man/man1/gyes.1'
  src/ginstall -c src/yes '/usr/local/Cellar/coreutils/8.27/bin/./gyes'
  src/ginstall -c src/ginstall '/usr/local/Cellar/coreutils/8.27/bin'
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
coreutils formula: incorrect $MANPAGES instructions https://github.com/Homebrew/homebrew-core/issues/14273
coreutils manpage not recognized by touchbar https://github.com/Homebrew/homebrew-core/issues/14262

Error: You are using macOS 10.9.
We (and Apple) do not provide support for this old version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

@ashleyjamesbrown
Copy link

It seems that all I had to do was upgrade to Mac OSX 10.12 and the latest xCode and it allowed me to install the xcode command line tools and coreutils so the above errors stopped.

brew link --overwrite coreutils fixed the link error

Now it seems to be able to run the train command on the cpu (its been going for the last 12 hours)

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

6 participants