In my code,  I have 2 model works on different graphics, and caculate the loss between their outputs.  I have set input on cuda(0) as well as the src_model, but error occured  while training.

RuntimeError: Expected tensor for argument #1 ‘input’ to have the same device as tensor for argument #2 ‘weight’; but device 0 does not equal 1 (while checking arguments for cudnn_convolution)