im2markup
im2markup copied to clipboard
Want to train and test on CPU
I wish to test the model on a CPU, how can i achieve that? I have tried setting the gpd_id as 0 but it returns an error stating spatialconvolution requires cuda. Therefore, i included a line cudnn.convert(model[1], nn) in model.lua before line 55 to overcome the error. But now i'm getting another error:
bad argument #2 to '?' (number expected, got userdata)
stack traceback:
[C]: in ?
[C]: in function '__add'
../im2markup/src/model/model.lua:593: in function 'feval'
../im2markup/src/model/model.lua:887: in function 'step'
../im2markup/src/train.lua:111: in function 'train'
../im2markup/src/train.lua:291: in function 'main'
../im2markup/src/train.lua:297: in main chunk
Any help is appreciated! Thanks
@bernardcwj @da03 Do you find a way to solve this problem?
Hmm a simple workaround is to just use modules from nn instead of cudnn, but I think training on CPU would be too slow to be realistic.
I am training it on cpu, one epoch spends 5 hours