For using torch.jit.script is recommended to pass model to cpu if you are doing inference in that device?
torch.jit.script