| 108 | |
| 109 | |
| 110 | def 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 | |
| 123 | def test_roi_align_wrong_rois_last_dim(): |