Skip to content

fix construct author embeddings#15

Open
soodoshll wants to merge 4 commits intozheng-da:use_oagfrom
soodoshll:oag_fix
Open

fix construct author embeddings#15
soodoshll wants to merge 4 commits intozheng-da:use_oagfrom
soodoshll:oag_fix

Conversation

@soodoshll
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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