-
Notifications
You must be signed in to change notification settings - Fork 143
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
nil value #42
Comments
Hi @zhuyating, require 'math'
val = 5
val2 = math.log10(val)
print('math.log10(' .. val .. ') = ' .. val2) |
Thank you for your reply.I have installed torch corretly like you mentioned before: But still got this error when running your code above : /home/username/torch/install/bin/lua: torch.lua:3: attempt to call field 'log10' (a nil value) Is there any problem with my cuda or cudnn?I use cuda-9.2 and cudnn7,is it compatible with torch?But I have tried this command below,and it runs smoothly: But still have the error with math.log10.Do you have another suggestion?Thank you so much. |
By the way ,I installed torch with Lua 5.2 instead of LuaJIT. |
I use ubuntu16.04.It is said that torch7 is not compatible with cuda9.2,is it wright?Should I use cuda8.x? |
I never had problems with math.log10, I don't really know what the main problem could be. Regarding cuda version, torch7 hasn't been maintained for a while and it doesn't support cuda 9.2 export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
./install.sh
# after installation is complete
cd ~/torch/extra/cudnn
git checkout R6 # replace with the version you installed in $LD_LIBRARY_PATH
luarocks make |
Thanks for your kind help.I will have a try. |
PyTorch version now available here: https://github.com/SeungjunNah/DeepDeblur-PyTorch |
Thank you very much! I will have a try. |
Hey,Thank you for your shared code.I have modified the opts.lua:
cmd:option('-threads', 0, 'number of main threads')
cmd:option('-nDonkeys', 0, 'number of donkeys to initialize (data loading threads)')
And I got an error when make this command: th main.lua -nEpochs 451 -save scale3
the error is :
epoch begins : 1
==> training!
==> doing epoch on training data:
==> online epoch # 1 [mini-batchSize = 1]
/home/username/torch/install/bin/lua: train.lua:259: attempt to call field 'log10' (a nil value)
stack traceback:
train.lua:259: in function 'cumulate_error'
train.lua:283: in function 'f2'
data.lua:117: in function 'addjob'
train.lua:275: in function 'train'
main.lua:89: in main chunk
[C]: in function 'dofile'
...name/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?
the error mentioned above is located in train.lua:259: cPSNR = cPSNR - 10math.log10(mse),
I rewrote it as cPSNR = cPSNR - 10math.log10(math.abs(mse)+0.01),but makes no difference.
Could you help me for this problem?Thank you very much.
The text was updated successfully, but these errors were encountered: