@fmassa Thanks for your response! Could you help me more (I am so fresh in pytorch)?
I have got one more question. Is it possible to run network on gpu and run criterion on cpu separately. I mean after forwarding input through network with gpu, I change the type of the tensor from CudaFloatTensor to FloatTensor, then, do the calculation via criterion and when backwarding from cost function I just return CudaFloatTensor?