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 weighted_skip parameter to MutilayerPerceptron layer #3494
Conversation
deepchem/models/tests/test_layers.py
Outdated
@@ -703,6 +703,30 @@ def test_MultilayerPerceptron_overfit(): | |||
assert np.allclose(output, y, atol=1e-2) | |||
|
|||
|
|||
@pytest.mark.torch | |||
def test_weighted_skip_MultilayerPerceptron(): |
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.
Change this to test_weighted_skip_multilayer_perceptron
.
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.
On that note, could you also change the other tests with MultilayerPerceptron
to a similar form?
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.
Yea sure, I will.
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
LGTM |
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
Description
By Adding weighted_skip parameter to MutilayerPerceptron layer, it can be used for skip connection as well. Hence, it can be used in place of ResidualBlock for Global and Local Message Passing in MXMNet Model.
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