How to convert nms to torchscript?

I want to convert a detection model to torchscript, but there are some control/loop in nms code, how can I replace them with operations supported in torchscript?

You can use normal Python control flow in script mode (in contrast to tracing which it sounds like you’re talking about). Are you running into any specific issues?

Thank you, script mode solved my problem.

1 Like