-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Adding readout layers for use in grover #3269
Conversation
467c1bf
to
dea8f5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost good to go, one minor comment
class GroverReadout(nn.Module): | ||
"""Performs readout on a batch of graph | ||
|
||
The readout module is used for performing readouts on batched graphs to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a few sentences explaining how this is used in the Grover model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added docs in 521a676
dea8f5d
to
521a676
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please feel free to merge once CI looks good
Pull Request Template
Description
I have added a readout layer and corresponding tests for it. The readout layer for performing readout from a graph and used in models like Grover and other graph neural networks. Currently, it supports two ways for readout:
In future, more readout operations can also be supported.
To perform readout on a batched graph, it accepts a list of embedding vectors. It also additionaly accepts a parameter
scope
which allows to group embedding of nodes/edges to a graph by mapping the start index and end index of the embedding list to a graph in the batch of graphs.Type of change
Please check the option that is related to your PR.
Checklist
yapf -i <modified file>
and check no errors (yapf version must be 0.32.0)mypy -p deepchem
and check no errorsflake8 <modified file> --count
and check no errorspython -m doctest <modified file>
and check no errors