Solved by ptrblck in post #2 
              
              
                It looks like some tensors are on the CPU, while the code would like to call a function on a tensor which was pushed to the GPU. 
Could you post a small code snippet reproducing this error?