backprop for sigma
This commit is contained in:
parent
e17d1cbe7a
commit
9675dc765d
|
@ -1,3 +1,5 @@
|
||||||
export σ
|
export σ
|
||||||
|
|
||||||
σ(x) = 1 ./ (1 .+ exp.(-x))
|
σ(x) = 1 ./ (1 .+ exp.(-x))
|
||||||
|
|
||||||
|
back!(::typeof(σ), Δ, x) = Δ .* σ(x)./(1.-σ(x))
|
||||||
|
|
|
@ -5,7 +5,7 @@ export Model, back!, update!, param
|
||||||
abstract Model
|
abstract Model
|
||||||
|
|
||||||
back!(m::Model, ∇) = error("Backprop not implemented for $(typeof(m))")
|
back!(m::Model, ∇) = error("Backprop not implemented for $(typeof(m))")
|
||||||
update!(m::Model, η) = m
|
update!(m, η) = m
|
||||||
|
|
||||||
# Model parameters
|
# Model parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue