Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RoIHeads: don't remove empty boxes in postprocess
pytorch#1019 introduced a change that removes empty boxes in postprocessing on the basis that, previously, empty boxes would actually reach this postprocessing step, and that the model could therefore output empty boxes (even though NMS would've most likely filtered them out). It's essentially a safety check that'd be seldom needed. However, that filtering causes dynamicity on the TPU (because the number of empty boxes, if any, would be unknown). And in any case, we recently introduced a change in PR pytorch#4 that purposefully pads the boxes tensor with empty boxes, to avoid dynamicity. Therefore there's no point trying to remove boxes that we use as padding, we'll just filter those out of the output on the CPU.
- Loading branch information