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

Train wide-resnet error on fb.resnet.torch #31

Open
chakkritte opened this issue Jan 26, 2017 · 3 comments
Open

Train wide-resnet error on fb.resnet.torch #31

chakkritte opened this issue Jan 26, 2017 · 3 comments

Comments

@chakkritte
Copy link

chakkritte commented Jan 26, 2017

I use this code copy to model in fb.resnet.torch

https://github.com/szagoruyko/wide-residual-networks/blob/master/pretrained/wide-resnet.lua

Train script :

th main.lua -netType wideresnet -depth 18 -width 2 -batchSize 64 -nGPU 1 -nThreads 8 -data /home/ml/chakkrit/Fold1/ -nClasses 50

Output error :

=> Training epoch # 1
/home/ml/torch/install/bin/lua: /home/ml/torch/install/share/lua/5.2/nn/THNN.lua:117: bad argument #2 to 'v' (mismatch between the batch size of input (128) and that of target (64) at /tmp/luarocks_cunn-scm-1-3695/cunn/lib/THCUNN/generic/ClassNLLCriterion.cu:39)
stack traceback:
[C]: in function 'v'
/home/ml/torch/install/share/lua/5.2/nn/THNN.lua:117: in function 'ClassNLLCriterion_updateOutput'
.../ml/torch/install/share/lua/5.2/nn/ClassNLLCriterion.lua:44: in function 'updateOutput'
...torch/install/share/lua/5.2/nn/CrossEntropyCriterion.lua:20: in function <...torch/install/share/lua/5.2/nn/CrossEntropyCriterion.lua:11>
(...tail calls...)
./train.lua:58: in function 'train'
main.lua:54: in main chunk
[C]: in function 'dofile'
...e/ml/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: in ?

How to fix ?

thank

@szagoruyko
Copy link
Owner

@chakkritte can you train a resnet from fb.resnet.torch to check if the error still happens?

@ps48
Copy link

ps48 commented Feb 24, 2017

@chakkritte @szagoruyko I am having the issue -depth 18 -width 2 works fine, but -depth 50 width -2 throws this error.
P.S. resnet from fb.resnet.torch works fine .

@chakkritte
Copy link
Author

chakkritte commented Feb 24, 2017

@szagoruyko fb.resnet.torch work fine too.

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

3 participants