forked from facebookresearch/detectron2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Previously `max_size` will be hardcoded in traced ONNX model since some dataflow/computation is outside PyTorch. The entire chunk between `[Sub, Div]`(whitening) and `Pad` shows how this shape inferencing works, with `size_divisibility==32` for this backbone. `ceil()` is replaced with `[Add, Div, Mul]` in the middle, i.e. `(n + (m - 1)) // m * m` with constant folding for `m-1`. <img width="479" alt="image" src="https://user-images.githubusercontent.com/5203025/79173373-e9d48780-7e29-11ea-880b-dc8612e027e2.png"> Pull Request resolved: facebookresearch#1208 Reviewed By: rbgirshick Differential Revision: D21076153 Pulled By: ppwwyyxx fbshipit-source-id: c6d37114dd5d9cb0ec65f561fba7961ce26d74ec
- Loading branch information
1 parent
9ced00a
commit 1e3bd77
Showing
2 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters