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

[NN] Add TAGCN nn.module and example #788

Merged
merged 35 commits into from Aug 25, 2019

Conversation

@classicsong
Copy link
Contributor

commented Aug 23, 2019

Description

Add TAGCN nn.module on dgl.nn.pytorch
Add TAGCN example under example.pytorch
Add unitest for TAGCN

#756

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change
  • Related issue is referred in this PR

Changes

yzh119 and others added 29 commits Aug 6, 2019
upd
Song
Update README.md for pytorch PinSage example.
Add noting that the PinSage model example under
example/pytorch/recommendation only work with Python 3.6+
as its dataset loader depends on stanfordnlp package
which work only with Python 3.6+.
Song
Provid a frame agnostic API to test nn modules on both CPU and CUDA s…
…ide.

1. make dgl.nn.xxx frame agnostic
2. make test.backend include dgl.nn modules
3. modify test_edge_softmax of test/mxnet/test_nn.py and
    test/pytorch/test_nn.py work on both CPU and GPU
Make agnostic test only related to tests/backend
1. clear all agnostic related code in dgl.nn
2. make test_graph_conv agnostic to cpu/gpu

* cora: ~0.812 (0.804-0.823) (paper: 0.833)
* citeseer: ~0.715 (paper: 0.714)
* pubmed: ~0.790 (paper: 0.811)

This comment has been minimized.

Copy link
@yzh119

yzh119 Aug 23, 2019

Member

Try tuning some hyper-parameters like weight_decay and see if the result is still lower then the number in TAGCN paper.

This comment has been minimized.

Copy link
@classicsong

classicsong Aug 24, 2019

Author Contributor

I tried weight_decay and lr for pubmed dataset, there is minor performance improvement.
The new test result was updated.

classicsong added 3 commits Aug 24, 2019

@classicsong classicsong changed the title Add TAGCN nn.module and example [NN] Add TAGCN nn.module and example Aug 24, 2019

@yzh119
Copy link
Member

left a comment

LGTM, need some minor revisions.


from tagcn import TAGCN

#from gcn import GCN

This comment has been minimized.

Copy link
@yzh119

yzh119 Aug 24, 2019

Member

Please remove these comments

If not None, applies an activation function to the updated node features.
Default: ``None``.
Attributes

This comment has been minimized.

Copy link
@yzh119

yzh119 Aug 24, 2019

Member

Describe attributes here.

self._in_feats = in_feats
self._out_feats = out_feats
self._k = k

This comment has been minimized.

Copy link
@yzh119

yzh119 Aug 24, 2019

Member

remove unnecessary empty lines.

@jermainewang

This comment has been minimized.

Copy link
Member

commented Aug 24, 2019

Since Cora/Citeseer/Pubmed are so common and their training loop are essentially the same, is it possible to put these modules in one example?

@yzh119

This comment has been minimized.

Copy link
Member

commented Aug 24, 2019

Yes we can create a "citation network" folder in examples.

@yzh119

This comment has been minimized.

Copy link
Member

commented Aug 24, 2019

Also, I recommend change the name of this clas from TAGCN to something ended with Conv, to be consistent with other class in this module.

@classicsong

This comment has been minimized.

Copy link
Contributor Author

commented Aug 25, 2019

Also, I recommend change the name of this clas from TAGCN to something ended with Conv, to be consistent with other class in this module.

Actually, in nn/pytorch/conv.py it is called TGConv.

@classicsong

This comment has been minimized.

Copy link
Contributor Author

commented Aug 25, 2019

Since Cora/Citeseer/Pubmed are so common and their training loop are essentially the same, is it possible to put these modules in one example?

I don't think so. These modules/examples can also be applied to other datasets. They are not bounded only with these three datasets actually.

@yzh119
yzh119 approved these changes Aug 25, 2019
Copy link
Member

left a comment

I'm ok with this pr, go ahead and merge it.
The error in CI comes from shared memory: #755 . You can append an empty commit by git commit --allow-empty -m "trigger" to trigger another unittest.

python/dgl/nn/pytorch/conv.py Outdated Show resolved Hide resolved
classicsong added 2 commits Aug 25, 2019

@yzh119 yzh119 merged commit 11fb217 into dmlc:master Aug 25, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.