-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add masked average pooling for pooling with segmentation masks (DetCo…
…n) (#1739) * add masked average pooling for DetCon * add tests for masked average pooling * skip tests for torch < 1.12 * fix formatting * add return type hints * add return type hints to tests * Update lightly/models/utils.py Co-authored-by: guarin <43336610+guarin@users.noreply.github.com> * Update lightly/models/utils.py Co-authored-by: guarin <43336610+guarin@users.noreply.github.com> * change tensor shape doc convention * call batched function instead of separate implementation * change to new_zeros() * remove packaging dependency * Update tests/models/test_ModelUtils.py Co-authored-by: guarin <43336610+guarin@users.noreply.github.com> * squeeze output of unbatched function * fix scatterops available * add type hints to tests * make test more readable * remove unnecessary import * rename pooling function --------- Co-authored-by: guarin <43336610+guarin@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
173 additions
and
0 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