-
Notifications
You must be signed in to change notification settings - Fork 101
Added gating activation classes #180
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
Conversation
|
By the way, this might have an impact on performance since I am calling |
sdatkinson
left a comment
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.
Couple call-outs
sdatkinson
left a comment
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.
Haven't gotten to the tests yet, but blending activation isn't quite right.
…ctivation. Removed all runtime checks and replaced with asserts.
sdatkinson
left a comment
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.
Nits but nothing critical 👍🏻
|
|
||
| nam::gating_activations::GatingActivation gating_act(nullptr, nullptr, channels); | ||
|
|
||
| // This should not crash or produce incorrect results due to memory contiguity issues |
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.
Nit: This might be done better...but the numerical assertions are reasonable, and when this gets combined with the better real-time saftey testing in the Conv1D PR we'll be in good shape.
Adding abstractions for gating activations and blending activations. These classes are both very similar: they take two activations (and a blending coefficient alpha for blending activations). One activation is used for channel 0 of the input (the "input activation" in the code) and the other is used for channel 1 (the "gating activation" in the code). The difference between the two is that gating activation uses the activation of the second channel as a gate, while blending activation sums both channels scaled by alpha and (1-alpha).
Developed with support and sponsorship from TONE3000