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

Function test_roi_pool_wrong_input_ndim

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

Source from the content-addressed store, hash-verified

1207
1208
1209def test_roi_pool_wrong_input_ndim():
1210 bb = relax.BlockBuilder()
1211 x0 = relax.Var("x", R.Tensor((2, 3, 32), "float32"))
1212 x1 = relax.Var("x", R.Tensor((2, 3, 32, 32), "float32"))
1213 rois0 = relax.Var("rois", R.Tensor((4,), "float32"))
1214 rois1 = relax.Var("rois", R.Tensor((4, 5), "float32"))
1215
1216 with pytest.raises(ValueError):
1217 bb.normalize(relax.op.vision.roi_pool(x0, rois1, (7, 7), 1.0))
1218 with pytest.raises(ValueError):
1219 bb.normalize(relax.op.vision.roi_pool(x1, rois0, (7, 7), 1.0))
1220
1221
1222def test_roi_pool_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…