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

/usr/local/bin/luajit: lib/LeakyReLU.lua:1: attempt to index global 'nn' (a nil value) #41

Closed
Saren-Arterius opened this issue Aug 4, 2015 · 6 comments

Comments

@Saren-Arterius
Copy link

It suddenly does not work anymore, after I have upgraded NVIDIA driver in host and docker...
I have no idea why would this happen...

root@8927a337995c:~/waifu2x# th waifu2x.lua 
/usr/local/bin/luajit: /root/waifu2x/lib/LeakyReLU.lua:1: attempt to index global 'nn' (a nil value)
stack traceback:
    /root/waifu2x/lib/LeakyReLU.lua:1: in main chunk
    [C]: in function 'require'
    waifu2x.lua:4: in main chunk
    [C]: in function 'dofile'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00404ac0
@c0d3rman
Copy link

c0d3rman commented Aug 4, 2015

This happened to me too. Adding
require "nn"
at the top of waifu2x.lua (And train.lua and any other files where the error shows up) fixed it.

@Saren-Arterius
Copy link
Author

This is new...

/usr/local/bin/luajit: /usr/local/share/lua/5.1/torch/File.lua:260: unknown Torch class <torch.CudaTensor>
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/torch/File.lua:260: in function 'readObject'
    /usr/local/share/lua/5.1/torch/File.lua:282: in function 'readObject'
    /usr/local/share/lua/5.1/torch/File.lua:268: in function 'readObject'
    /usr/local/share/lua/5.1/torch/File.lua:305: in function 'load'
    waifu2x.lua:32: in function 'convert_image'
    waifu2x.lua:116: in function 'waifu2x'
    waifu2x.lua:121: in main chunk
    [C]: in function 'dofile'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00404ac0

@nagadomi
Copy link
Owner

nagadomi commented Aug 5, 2015

Fixed?

@Saren-Arterius
Copy link
Author

I think at least it's my own problem now.

/usr/local/bin/luajit: /usr/local/share/lua/5.1/trepl/init.lua:363: /tmp/luarocks_cutorch-scm-1-178/cutorch/lib/THC/THCGeneral.c(10) : cuda runtime error (38) : no CUDA-capable device is detected at /tmp/luarocks_cutorch-scm-1-178/cutorch/lib/THC/THCGeneral.c:241
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/trepl/init.lua:363: in function 'require'
    /root/waifu2x/lib/portable.lua:2: in main chunk
    [C]: in function 'require'
    waifu2x.lua:1: in main chunk
    [C]: in function 'dofile'
    /usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00404ac0

@nagadomi nagadomi closed this as completed Aug 5, 2015
@Saren-Arterius
Copy link
Author

Yep, confirmed it's my problem. I won't use docker for waifu2x anymore, because torch7 can be installed in Arch from now.

@glubsy
Copy link

glubsy commented Sep 16, 2018

Yeah, your docker image doesn't work, Saren. Just tried it.

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

4 participants