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

[Feature] Support Perceptual Loss #471

Merged
merged 6 commits into from
Nov 2, 2022

Conversation

Taited
Copy link
Contributor

@Taited Taited commented Oct 14, 2022

Motivation

Perceptual Loss is an important and commonly used loss for improving perceptual quality in generation tasks. As discussed in issues 445, it is necessary to support perceptual loss in style transfer.

Modification

This PR makes modifications to files mmgeneration/mmgen/models/losses/__init__.py and mmgeneration/mmgen/models/losses/gen_auxiliary_loss.py. And there are unit tests in mmgeneration/tests/test_losses/test_gen_auxiliary_loss.py as well.

@Taited Taited marked this pull request as ready for review October 28, 2022 11:06
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Base: 74.68% // Head: 74.81% // Increases project coverage by +0.13% 🎉

Coverage data is based on head (54dd32a) compared to base (1869bcd).
Patch coverage: 89.10% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
+ Coverage   74.68%   74.81%   +0.13%     
==========================================
  Files         145      145              
  Lines       10914    11015     +101     
  Branches     2076     2097      +21     
==========================================
+ Hits         8151     8241      +90     
- Misses       2229     2233       +4     
- Partials      534      541       +7     
Flag Coverage Δ
unittests 74.81% <89.10%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmgen/models/losses/__init__.py 100.00% <ø> (ø)
mmgen/models/losses/gen_auxiliary_loss.py 63.98% <89.10%> (+18.79%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@plyfager plyfager merged commit fe219fe into open-mmlab:master Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants