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

Correctly use edge weights in GDC example #6159

Merged
merged 3 commits into from
Dec 7, 2022

Conversation

dongyukang1
Copy link
Contributor

If you want to use GDC,you will find accuracy drop,because T.GDC( ) save the calculated edge weight in data.edge_ attr,not data.edge_weight.

I directly change 'model(data.x, data.edge_index, data.edge_weight)' to 'model(data.x, data.edge_index, data.edge_attr)' in function train() and test().
When data.edge_weight is None ,like Cora,it's right.

If you want to use GDC,you will find accuracy drop,because T.GDC( ) save the calculated edge weight in data.edge_ attr,not data.edge_weight.

I directly change 'model(data.x, data.edge_index, data.edge_weight)' to 'model(data.x, data.edge_index, data.edge_attr)' in function train() and test()
When the dataset's edge_weight is None ,like Cora,it's right.
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #6159 (017ff06) into master (b2df844) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 017ff06 differs from pull request most recent head e101f69. Consider uploading reports for the commit e101f69 to get more accurate results

@@            Coverage Diff             @@
##           master    #6159      +/-   ##
==========================================
+ Coverage   84.40%   84.42%   +0.01%     
==========================================
  Files         366      366              
  Lines       20558    20590      +32     
==========================================
+ Hits        17352    17383      +31     
- Misses       3206     3207       +1     
Impacted Files Coverage Δ
torch_geometric/nn/conv/utils/typing.py 81.25% <0.00%> (-2.50%) ⬇️
torch_geometric/nn/summary.py 100.00% <0.00%> (ø)
torch_geometric/deprecation.py 100.00% <0.00%> (ø)
torch_geometric/utils/mixin.py 100.00% <0.00%> (ø)
torch_geometric/data/download.py 100.00% <0.00%> (ø)
torch_geometric/nn/conv/gmm_conv.py 100.00% <0.00%> (ø)
torch_geometric/profile/profiler.py 0.00% <0.00%> (ø)
torch_geometric/nn/conv/arma_conv.py 100.00% <0.00%> (ø)
torch_geometric/nn/conv/spline_conv.py 100.00% <0.00%> (ø)
torch_geometric/loader/graph_saint.py 98.01% <0.00%> (+0.04%) ⬆️
... and 16 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rusty1s rusty1s changed the title Update gcn.py Correctly use edge weights in GDC example Dec 7, 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.

Thanks for this catch :(

@rusty1s rusty1s enabled auto-merge (squash) December 7, 2022 06:20
@rusty1s rusty1s merged commit a4fc47a into pyg-team:master Dec 7, 2022
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.

None yet

2 participants