MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / test_nms

Function test_nms

imperative/python/test/unit/utils/test_network_node.py:626–639  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

624
625@pytest.mark.skip(reason="advance indexing trace error")
626def test_nms():
627 x = np.zeros((100, 4))
628 np.random.seed(42)
629 x[:, :2] = np.random.rand(100, 2) * 20
630 x[:, 2:] = np.random.rand(100, 2) * 20 + 100
631 scores = Tensor(np.random.rand(100))
632 inp = Tensor(x)
633
634 @trace(symbolic=True, capture_as_const=True)
635 def fwd(inp, scores):
636 return F.nn.nms(inp, scores, iou_thresh=0.7, max_output=3)
637
638 result = fwd(inp, scores)
639 check_pygraph_dump(fwd, [inp, scores], [result])
640
641
642def test_dimshuffle():

Callers

nothing calls this directly

Calls 5

TensorClass · 0.90
check_pygraph_dumpFunction · 0.85
fwdFunction · 0.70
zerosMethod · 0.45
seedMethod · 0.45

Tested by

no test coverage detected