Solved by albanD in post #23 
              
              
                From the stack trace it looks like the problem is with the outputs no? 
Maybe your forward returns Tensors that are not on the right device?