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

Added MeanSubtractionNorm layer #5068

Merged
merged 10 commits into from
Jul 30, 2022
Merged

Conversation

Padarn
Copy link
Contributor

@Padarn Padarn commented Jul 28, 2022

Implements a generic version of the layer suggested here: #5056

@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #5068 (d8e42bf) into master (8407727) will increase coverage by 0.00%.
The diff coverage is 93.33%.

@@           Coverage Diff           @@
##           master    #5068   +/-   ##
=======================================
  Coverage   82.96%   82.97%           
=======================================
  Files         332      333    +1     
  Lines       18353    18368   +15     
=======================================
+ Hits        15227    15241   +14     
- Misses       3126     3127    +1     
Impacted Files Coverage Δ
torch_geometric/nn/norm/mean_subtraction_norm.py 92.85% <92.85%> (ø)
torch_geometric/nn/norm/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

CHANGELOG.md Outdated Show resolved Hide resolved
test/nn/norm/test_agg_norm.py Outdated Show resolved Hide resolved
test/nn/norm/test_agg_norm.py Outdated Show resolved Hide resolved
torch_geometric/nn/norm/agg_norm.py Outdated Show resolved Hide resolved
torch_geometric/nn/norm/agg_norm.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lightaime lightaime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice discussion! Another option is to add a flag to PairNorm to support MeanSubtractionNorm or reimplement PairNorm with MeanSubtractionNorm so that we reduce the lines of code.

torch_geometric/nn/norm/agg_norm.py Outdated Show resolved Hide resolved
@Padarn
Copy link
Contributor Author

Padarn commented Jul 28, 2022

Nice suggestion @lightaime! I agree, we should do one of those two.

@rusty1s
Copy link
Member

rusty1s commented Jul 28, 2022

We can re-implement PairNorm with MeanSubtractionNorm. Okay to do it here or in a follow-up PR. WDYT?

@Padarn Padarn changed the title Add AggSubtraction norm layer Add MeanSubtractionNorm norm layer Jul 29, 2022
@Padarn
Copy link
Contributor Author

Padarn commented Jul 29, 2022

Agree @rusty1s. Just fixed up the main comments here. Lets do that elsewhere.

@rusty1s rusty1s changed the title Add MeanSubtractionNorm norm layer Added MeanSubtractionNorm layer Jul 30, 2022
@rusty1s rusty1s enabled auto-merge (squash) July 30, 2022 19:34
@rusty1s rusty1s merged commit c13e169 into pyg-team:master Jul 30, 2022
Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for your work @Padarn. Looks great as always!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Addition of Mean Substraction Operator from "Revisiting “Over-smoothing” in Deep GCNs"
4 participants