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

fix construct author embeddings #15

Open
wants to merge 4 commits into
base: use_oag
Choose a base branch
from

Conversation

soodoshll
Copy link

Description

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [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

@soodoshll soodoshll changed the title fix construct author embeddings [WIP] fix construct author embeddings Dec 18, 2020
@soodoshll soodoshll changed the title [WIP] fix construct author embeddings fix construct author embeddings Dec 21, 2020
paper_author_subg = hg_no_feats['paper', : , 'author']
paper_author_subg.nodes['paper'].data['emb'] = hg.nodes['paper'].data['emb']
paper_author_subg.update_all(fn.copy_src('emb', 'm'), fn.mean('m', 'h'))
hg.nodes['author'].data['emb'] = paper_author_subg.nodes['author'].data['h']
Copy link
Owner

Choose a reason for hiding this comment

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

why do we have to clone the graph structure here?

Copy link
Author

Choose a reason for hiding this comment

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

Because relation slice will duplicate the node feature, which is huge.

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