Solved by ptrblck in post #5 
              
              
                I tried the code with every tensor on the GPU but w_pos and got the same error message, thus I assumed this is the error. 
Could you post a code snippet to reproduce this error?