-
Notifications
You must be signed in to change notification settings - Fork 478
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
[SYSTEMDS-3694] Sequence primitive for neural network layers #2025
Conversation
This commit adds a Layer interface for the Python API. The Affine and ReLU classes are changed to extend this interface.
This commit fixes some small formatting issues in the modified classes.
This commit adds a Sequential primitive to the nn Python API. It is able to combine multiple nn layers into one sequential module.
Hi @Nakroma The code looks great! The PR is nearly done. Currently missing
best regards |
This commit adds the backwards pass to the Sequential primitives. It also makes a minor fix in the python MultiReturn so outputs of the instance can be properly accessed.
This commit lets the Sequential primitive correctly handle MultiReturns in the forward pass.
Hey @Baunsgaard I actually completely forgot the backwards pass - sorry about that, it is added now! About the multi returns - I wasn't 100% sure if returns for forward/backward passes are standardized. So I assumed here how it's handled in affine.py and relu.py is the standard - i.e. I check for a MultiReturn or a single node and return based on that. This might have to be changed depending on how the layer generator will work in the future though. Let me know if you think there is a better solution for that also. Best, |
Great, i like the change. seems like you found a few bugs in the process. Can we add a few more tests, where
and a few more variations. Also can we verify that the layers get updated correctly on the backwards pass. Once these are added I would consider the PR finished and ready for merging. |
This commit adds more variations to Sequential testing involving MultiReturns. It also adds a test if the input gradient is set correctly on the backwards pass and fixes a bug where this was not the case on the affine layer.
@Baunsgaard just pushed a commit that addresses more variations and the layer update during backwards pass. |
Great. I will take a look tomorrow! |
This commit adds testing to verify that the layer gets updated correctly during forward and backward pass.
@Nakroma |
Draft for the student project
SYSTEMDS-3694
.