Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New wrapper FeatureShare #2120

Merged
merged 23 commits into from
Dec 22, 2023
Merged

New wrapper FeatureShare #2120

merged 23 commits into from
Dec 22, 2023

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Sep 28, 2023

What does this PR do?

Fixes #2099
Introduces a new wrapper FeatureShare that is intended to be used with metrics that uses some underlying neural network to do their calculation. As pointed out in the issue it is a waste of memory that the same network that can be shared between networks gets initialized multiple times and that the computations in not reused.

Work in progress...

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃


📚 Documentation preview 📚: https://torchmetrics--2120.org.readthedocs.build/en/2120/

@SkafteNicki SkafteNicki added the enhancement New feature or request label Sep 28, 2023
@SkafteNicki SkafteNicki added this to the v1.3.0 milestone Sep 28, 2023
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 29, 2023
@SkafteNicki SkafteNicki marked this pull request as ready for review November 29, 2023 08:56
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Merging #2120 (49b42e3) into master (7543641) will decrease coverage by 40%.
Report is 1 commits behind head on master.
The diff coverage is 76%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2120     +/-   ##
========================================
- Coverage      87%     47%    -40%     
========================================
  Files         300     303      +3     
  Lines       16971   17059     +88     
========================================
- Hits        14737    7991   -6746     
- Misses       2234    9068   +6834     

src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
src/torchmetrics/wrappers/feature_share.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready label Nov 30, 2023
@mergify mergify bot removed the ready label Dec 1, 2023
@mergify mergify bot added the has conflicts label Dec 1, 2023
@mergify mergify bot added ready and removed has conflicts labels Dec 4, 2023
@mergify mergify bot removed the has conflicts label Dec 22, 2023
@stancld stancld enabled auto-merge (squash) December 22, 2023 20:08
@stancld stancld merged commit 62adb40 into master Dec 22, 2023
60 checks passed
@stancld stancld deleted the feature/network_share branch December 22, 2023 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request ready topic: Image topic: MModal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Share Inception v3 network between FID, KID, Inception Score, and MiFID
3 participants