-
Notifications
You must be signed in to change notification settings - Fork 8
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
Delays and EventProp #104
Delays and EventProp #104
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 66.11% 65.18% -0.93%
==========================================
Files 101 101
Lines 4123 4220 +97
==========================================
+ Hits 2726 2751 +25
- Misses 1397 1469 +72 ☔ View full report in Codecov by Sentry. |
…ys in both EventProp and standard compilers don't exceed 255
* Do not run optimiser or reduction custom updates after 1st training batch (no backward pass has completed) * After each validation epoch, zero all gradients
… use BROADCAST mode unless their value is used to reset other variables
* Added helper to Compiler to build a custom update that zeros a Connection's OutPost and DenDelay (if it is delayed) * Update EventProp and Inference compilers to add these in appropriate places
…om updates
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.
I think I was able to follow most of it and it looks ok. Just to confirm, delays are not reset after an epoch, right? Only the gradients either for weights or for delays. (otherwise the reset would be fatal if learning delays, obviously).
This PR improves handling of delays and allows them to be learned using EventProp (using new functionality from genn-team/genn#629).
However, incorporating delays means that you need to be careful between trials to empty dendritic delay buffers (as well as
outPost
) and make sure variables accessed with delays (LambdaI
) are also reset correctly. This PR modifies the existing reset logic using the new functionality implemented in genn-team/genn#634, namely:create_reset_custom_update
helper now usesVarAccessMode.BROADCAST
wherever possible so resets will be applied across all delay slots if necessary (also saves an unnecessary memory read)Compiler.add_out_post_zero_custom_update
helper to create custom updates that zerooutPost
and, if necessarydenDelay
on device.This PR also includes fixes for several issues which somehow only came to light when trying to train SSC.
Also, this PR modifies
CompiledTrainingNetwork.train
to take a seperate list of validation callbacks, preventing irritating issues around e.g. checkpointing and learning rate schedules which I think Tom, Balazs and everyone else who's tried to use mlGeNN hit!Fixes #90