huangzehao / torch-srgan

torch implementation of srgan
MIT License
78 stars 22 forks source link

attempt to call method 'clip' (a nil value) #1

Closed yulunzhang closed 7 years ago

yulunzhang commented 7 years ago

Hi Thanks for sharing this code. I can use it to train. But when I try to run 'test.lua', there is something wrong. -------Erro Info--------- lunge@lunge:/media/lunge/Users/projects/SRGAN/torch-srgan$ CUDA_VISIBLE_DEVICES=0 th test.lua -img ./imgs/comic_input.bmp -output ./output.bmp -model ./models/models-huang/SRResNet_MSE_100.t7 Loading model ...
/home/lunge/torch/install/bin/luajit: test.lua:42: attempt to call method 'clip' (a nil value) stack traceback: test.lua:42: in function 'main' test.lua:46: in main chunk [C]: in function 'dofile' ...unge/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00405d50 -------Erro Info--------- I've tried to solve this problem with Google, but now I haven't solved it. Does the author also face the same problem or know how to solve it? @huangzehao

huangzehao commented 7 years ago

Hi, sorry about that. Try to use clamp instead of clip. It's a typo error. I will fix it right now.

yulunzhang commented 7 years ago

Thanks so much! It works now.