TypeError: FloatAbsCriterion_updateOutput received an invalid combination of arguments

I train my cnn network on pytorch 0.2.0,and it turns out a erorr:
TypeError: FloatAbsCriterion_updateOutput received an invalid combination of arguments - got (int, torch.FloatTensor, torch.cuda.FloatTensor, torch.FloatTensor, bool), but expected (int state, torch.FloatTensor input, torch.FloatTensor target, torch.FloatTensor output, bool sizeAverage)

I have added .cuda() behinds input tensors, target tensors, lossfunction and model

why did it mention the FloatAbsCriterion???

One tensor is still on the CPU.
Could you post the line of code which throws this error?

Also, you should upgrade to 0.4.0.
You can find the install instructions on the website and the migration guide here.