fix signs

This commit is contained in:
Mike J Innes 2016-08-24 15:41:17 +01:00
parent 8224c77f7d
commit e17d1cbe7a
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ end
function Flux.update!(model::MXModel, η)
for (arg, grad) in zip(model.exec.arg_arrays, model.exec.grad_arrays)
mx.@nd_as_jl rw = (arg, grad) begin
arg .+= grad .* η
arg .-= grad .* η
grad[:] = 0
end
end

View File

@ -24,7 +24,7 @@ function accumulate!(p::Param, Δ)
end
function update!(p::Param, η)
p.x .+= p.Δx .* η
p.x .-= p.Δx .* η
p.Δx[:] = 0
return p
end