Could you print the shapes of input and target to your criterion?
The code you’ve used to initialize the criterion might also be interesting to see.
The warning just states, that you are using a deprecated method (size_average or reduce) instead of the new reduction argument.