I try to use torchvision.ops.nms in my model, and convert mymodel.pth to mymodel.pt, it all sucess.But when load mymodel.pt  on mobile,came across error.
    Serialized   File "code/__torch__/torch/nn/modules/module/___torch_mangle_324.py", line 63
        _27 = torch.slice(_26, 1, 1, 9223372036854775807, 2)
        _28 = torch.copy_(_27, torch.view(_25, [90, 2]), False)
        keep = ops.torchvision.nms(boxes, scores0, 0.5)
               ~~~~~~~~~~~~~~~~~~~ <--- HERE
        _29 = torch.slice(boxes, 1, 0, 9223372036854775807, 1)
        keep0 = torch.to(keep, dtype=4, layout=0, device=torch.device("cpu"), pin_memory=False, non_blocking=False, copy=False, memory_format=None)
    
        at org.pytorch.NativePeer.initHybrid(Native Method)
        at org.pytorch.NativePeer.<init>(NativePeer.java:18)
        at org.pytorch.Module.load(Module.java:23)
        at org.pytorch.helloworld.MainActivity.onCreate(MainActivity.java:39)
        at android.app.Activity.performCreate(Activity.java:7458)
        at android.app.Activity.performCreate(Activity.java:7448)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
        	... 11 more

Someone can help,thanks.