When using JNI from Java, it seems not possible to allocate tensor objects to the GPU, and pytorch JNI will always allocate the tensors to CPU.
It’s also not possible to move the model to GPU memory, or if the traced model uses a GPU, it’s not possible to move it back to CPU.
Can someone confirm that my understanding is correct?