MCPcopy Create free account
hub / github.com/apache/tvm / test_nms_wrong_aux_input_shape

Function test_nms_wrong_aux_input_shape

tests/python/relax/test_op_vision.py:394–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

392
393
394def test_nms_wrong_aux_input_shape():
395 bb = relax.BlockBuilder()
396 data = relax.Var("data", R.Tensor((2, 10, 6), "float32"))
397 valid_count_bad_batch = relax.Var("valid_count_bad_batch", R.Tensor((3,), "int32"))
398 valid_count = relax.Var("valid_count", R.Tensor((2,), "int32"))
399 indices_bad_batch = relax.Var("indices_bad_batch", R.Tensor((3, 10), "int32"))
400 indices_bad_anchors = relax.Var("indices_bad_anchors", R.Tensor((2, 9), "int32"))
401 with pytest.raises(ValueError):
402 bb.normalize(
403 relax.op.vision.non_max_suppression(data, valid_count_bad_batch, indices_bad_anchors)
404 )
405 with pytest.raises(ValueError):
406 bb.normalize(relax.op.vision.non_max_suppression(data, valid_count, indices_bad_batch))
407 with pytest.raises(ValueError):
408 bb.normalize(relax.op.vision.non_max_suppression(data, valid_count, indices_bad_anchors))
409
410
411def test_nms_invalid_indices():

Callers

nothing calls this directly

Calls 2

normalizeMethod · 0.95
TensorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…