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

Preprocessing cropping script throws error? #12

Closed
AjayTalati opened this issue Feb 6, 2016 · 2 comments
Closed

Preprocessing cropping script throws error? #12

AjayTalati opened this issue Feb 6, 2016 · 2 comments

Comments

@AjayTalati
Copy link

Hello, I'm getting a tedious error running the cropping script for preprocessing the Celeb-A dataset,

ajay@ajay-h8-1170uk:~/TorchProjects/dcgan$ DATA_ROOT=celebA th data/crop_celebA.lua
/usr/local/bin/luajit: /usr/local/share/lua/5.1/image/init.lua:339: attempt to concatenate local 'ext' (a nil value)
stack traceback:
    /usr/local/share/lua/5.1/image/init.lua:339: in function 'load'
    data/crop_celebA.lua:7: in main chunk

I tried to run the script line by line from TREPL using,

data = '/home/ajay/TorchProjects/dcgan/celebA/img_align_celeba'
for f in paths.files(data, function(nm) return nm:find('.jpg') end) do
    f2 = paths.concat(data, f)
    print(f2)
    im = image.load(f2)
end

and got a similar error,

/home/ajay/TorchProjects/dcgan/celebA/img_align_celeba  
/usr/local/share/lua/5.1/image/init.lua:339: attempt to concatenate local 'ext' (a nil value)
stack traceback:
    /usr/local/share/lua/5.1/image/init.lua:339: in function 'load'
    [string "for f in paths.files(data, function(nm) retur..."]:4: in main chunk

Sorry about this I've been away from coding for a while?

@soumith
Copy link
Owner

soumith commented Feb 6, 2016

@AjayTalati could you try reinstalling image? ( luarocks install image )

@AjayTalati
Copy link
Author

@soumith Great, that did it! Just needed to clean and reinstall Torch, it's training nicely now.

Thanks a lot mate 👍

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