remove some explicit back!
This commit is contained in:
parent
052cc52ada
commit
21089fea9c
@ -6,16 +6,3 @@ end
|
|||||||
|
|
||||||
Affine(in::Integer, out::Integer; init = initn) =
|
Affine(in::Integer, out::Integer; init = initn) =
|
||||||
Affine(init(in, out), init(1, out))
|
Affine(init(in, out), init(1, out))
|
||||||
|
|
||||||
function back!(m::Affine, Δ, x)
|
|
||||||
W, b = m.W, m.b
|
|
||||||
W.Δx[:] = x' * Δ
|
|
||||||
b.Δx[:] = sum(Δ, 1)
|
|
||||||
Δ * W.x'
|
|
||||||
end
|
|
||||||
|
|
||||||
function update!(m::Affine, η)
|
|
||||||
update!(m.W, η)
|
|
||||||
update!(m.b, η)
|
|
||||||
m
|
|
||||||
end
|
|
||||||
|
Loading…
Reference in New Issue
Block a user