We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
WSquareRule
1 parent 8b33243 commit bf4c581Copy full SHA for bf4c581
src/lrp/rules.jl
@@ -193,14 +193,15 @@ LRP-``w²`` rule. Commonly used on the first layer when values are unbounded.
193
# Definition
194
Propagates relevance ``R^{k+1}`` at layer output to ``R^k`` at layer input according to
195
```math
196
-R_j^k = \\sum_i\\frac{w_{ij}^2}{\\sum_l w_{il}^2+b_i^2} R_i^{k+1}
+R_j^k = \\sum_i\\frac{w_{ij}^2}{\\sum_l w_{il}^2} R_i^{k+1}
197
```
198
199
# References
200
- $REF_MONTAVON_DTD
201
"""
202
struct WSquareRule <: AbstractLRPRule end
203
-modify_param!(::WSquareRule, p) = p .^= 2
+modify_weight!(::WSquareRule, w) = w .^= 2
204
+modify_bias!(::WSquareRule, b) = fill!(b, 0)
205
modify_input(::WSquareRule, input) = ones_like(input)
206
207
0 commit comments