| 1207 | |
| 1208 | |
| 1209 | def 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 | |
| 1222 | def test_roi_pool_wrong_rois_last_dim(): |