Here is an answer, that might work for you. You should create Tensor from NumPy array and then transfer it to device