Implement a backward for Heaviside
Context
Since the Heaviside function is non-differentiable, the classical approach is to use a surrogate gradient for the backward pass. The most common gradient function used is the shifted arctan function :
For the forward pass, th :
S[t] = Heaviside(U[t] - U_{\rm thr}) \approx \frac{1}{π}\text{arctan}(\pi U) \\
Thus for the backward :
\frac{\partial \tilde{S}}{\partial U} = \frac{1}{(1+(U \pi)^2)}
Merge request reports
Activity
Filter activity
added Feature 🚀 StatusWork in Progress TopicOperator labels
assigned to @jeromeh
added 31 commits
-
8053a48b...0d7ea895 - 25 commits from branch
eclipse/aidge:dev
- 2ee9cdf9 - feat: Add surrogate backward function for Heaviside operator
- 178652ce - Add Heaviside backward surrogate and associated tests
- 625009b6 - Improve test for Heaviside backward
- 8a6cb8c1 - Add randomness in heaviside backward test
- 4c4e8be4 - Format file and remove unused variable
- 23ce74a5 - Improve Heavisise Backward Test
Toggle commit list-
8053a48b...0d7ea895 - 25 commits from branch
added 43 commits
-
2b1afb4f...d34c4621 - 36 commits from branch
eclipse/aidge:dev
- 92820583 - feat: Add surrogate backward function for Heaviside operator
- 273b75f3 - Add Heaviside backward surrogate and associated tests
- 89229b87 - Improve test for Heaviside backward
- a847cd2e - Add randomness in heaviside backward test
- f877db57 - Format file and remove unused variable
- 892d4f15 - Improve Heavisise Backward Test
- 04129dbd - Fix includes
Toggle commit list-
2b1afb4f...d34c4621 - 36 commits from branch
added 14 commits
-
04129dbd...da5f38fa - 7 commits from branch
eclipse/aidge:dev
- 28ca848f - feat: Add surrogate backward function for Heaviside operator
- 2d63028a - Add Heaviside backward surrogate and associated tests
- 09bec268 - Improve test for Heaviside backward
- eff82020 - Add randomness in heaviside backward test
- c92b78e4 - Format file and remove unused variable
- 9c83962a - Improve Heavisise Backward Test
- e7c9550d - Fix includes
Toggle commit list-
04129dbd...da5f38fa - 7 commits from branch
@jeromeh Issues on Windows...
removed StatusWork in Progress label
added StatusReview Ready label
requested review from @cmoineau
- Resolved by Cyril Moineau
added StatusChanges required label and removed StatusReview Ready label
added 1 commit
- 3177f599 - Only define _USE_MATH_DEFINES on Windows platforms
Please register or sign in to reply