()
| 268 | |
| 269 | |
| 270 | def test_get_valid_counts_invalid_indices(): |
| 271 | bb = relax.BlockBuilder() |
| 272 | data = relax.Var("data", R.Tensor((2, 10, 6), "float32")) |
| 273 | with pytest.raises(ValueError): |
| 274 | bb.normalize(relax.op.vision.get_valid_counts(data, score_index=6)) |
| 275 | with pytest.raises(ValueError): |
| 276 | bb.normalize(relax.op.vision.get_valid_counts(data, id_index=6)) |
| 277 | with pytest.raises(ValueError): |
| 278 | bb.normalize(relax.op.vision.get_valid_counts(data, id_index=-2)) |
| 279 | |
| 280 | |
| 281 | def test_nms_op_correctness(): |