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

Function test_roi_align_wrong_input_ndim

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

Source from the content-addressed store, hash-verified

108
109
110def test_roi_align_wrong_input_ndim():
111 bb = relax.BlockBuilder()
112 x0 = relax.Var("x", R.Tensor((2, 3, 32), "float32"))
113 x1 = relax.Var("x", R.Tensor((2, 3, 32, 32), "float32"))
114 rois0 = relax.Var("rois", R.Tensor((4,), "float32"))
115 rois1 = relax.Var("rois", R.Tensor((4, 5), "float32"))
116
117 with pytest.raises(ValueError):
118 bb.normalize(relax.op.vision.roi_align(x0, rois1, (7, 7), 1.0))
119 with pytest.raises(ValueError):
120 bb.normalize(relax.op.vision.roi_align(x1, rois0, (7, 7), 1.0))
121
122
123def test_roi_align_wrong_rois_last_dim():

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…