You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.
I'm new to Torch, and trying to run a ResNet on my own data (consisting of two classes). I put the data into train and val directories, further divided into "class1" and "class2."
However, I got this error after running it "attempt to call method 'squeeze' (a nil value). More details below:
$ th main.lua -backend cudnn -nEpochs 5 -nClasses 2 -depth 18 -batchSize 8 -data [path to my data folder]
=> Creating model from file: models/resnet.lua
| ResNet-18 ImageNet
=> Training epoch # 1
/usr/bin/luajit: /usr/share/lua/5.1/nn/CrossEntropyCriterion.lua:11: attempt to call method 'squeeze' (a nil value)
stack traceback:
/usr/share/lua/5.1/nn/CrossEntropyCriterion.lua:11: in function 'forward'
./train.lua:58: in function 'train'
main.lua:52: in main chunk
[C]: in function 'dofile'
/usr/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
The text was updated successfully, but these errors were encountered:
I'd advise you to update your packages, maybe the error message does not correspond to the latest version available, I found that CudaLongTensor in the earlier version of cutorch doesn't support squeeze(), but the lateset version does.
I'm new to Torch, and trying to run a ResNet on my own data (consisting of two classes). I put the data into train and val directories, further divided into "class1" and "class2."
However, I got this error after running it "attempt to call method 'squeeze' (a nil value). More details below:
$ th main.lua -backend cudnn -nEpochs 5 -nClasses 2 -depth 18 -batchSize 8 -data [path to my data folder]
=> Creating model from file: models/resnet.lua
| ResNet-18 ImageNet
=> Training epoch # 1
/usr/bin/luajit: /usr/share/lua/5.1/nn/CrossEntropyCriterion.lua:11: attempt to call method 'squeeze' (a nil value)
stack traceback:
/usr/share/lua/5.1/nn/CrossEntropyCriterion.lua:11: in function 'forward'
./train.lua:58: in function 'train'
main.lua:52: in main chunk
[C]: in function 'dofile'
/usr/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
The text was updated successfully, but these errors were encountered: