forwarddiff does these
This commit is contained in:
parent
ad0e0ea5a7
commit
18e69b33c9
@ -1,10 +1,8 @@
|
|||||||
# Activation Functions
|
# Activation Functions
|
||||||
|
|
||||||
σ(x) = 1 / (1 + exp(-x))
|
σ(x) = 1 / (1 + exp(-x))
|
||||||
# back!(::typeof(σ), Δ, x) = Δ .* σ(x).*(1.-σ(x))
|
|
||||||
|
|
||||||
relu(x) = max(0, x)
|
relu(x) = max(0, x)
|
||||||
# back!(::typeof(relu), Δ, x) = Δ .* (x .> 0)
|
|
||||||
|
|
||||||
softmax(xs) = exp.(xs) ./ sum(exp.(xs), 2)
|
softmax(xs) = exp.(xs) ./ sum(exp.(xs), 2)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user