Torch.jit.trace model relates tensor to specified gpu_id and when using traced model in libtorch the tensor will move to the previous specified gpu_id which can not be changed?

(cfanyyx) #1

torch.jit.trace(model, example, check_trace=False) relates tensor to specified gpu_id and when using traced model in libtorch the tensor will move to the previous specified gpu_id which can not be changed?