masahi commented on a change in pull request #6314:
URL: https://github.com/apache/incubator-tvm/pull/6314#discussion_r473889810



##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -1428,6 +1428,48 @@ def test_forward_upsample3d():
     verify_model(torch.nn.Upsample(scale_factor=2, mode='trilinear', 
align_corners=True).eval(), inp)
 
 
+def test_forward_nms():
+    """dynamic Non-Maximum Suppression"""
+    torch.set_grad_enabled(False)
+    class NonMaxSupression1(Module):
+        def forward(self, *args):
+            return torchvision.ops.nms(args[0], args[1], 0.3)
+
+    class NonMaxSupression2(Module):
+        def forward(self, *args):
+            from torchvision.ops import nms
+            return torchvision.ops.nms(args[0], args[1], 0.5)
+
+    class NonMaxSupression3(Module):
+        def forward(self, *args):
+            from torchvision.ops import nms
+            return torchvision.ops.nms(args[0], args[1], 0.9)
+

Review comment:
       Only a single class should be enough. The third argument can be 
initialized in the constructor with different values.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to