update cleanup

This commit is contained in:
Mike Innes 2019-08-19 15:44:51 +01:00
parent 447fd9d604
commit 6c67404398

View File

@ -7,14 +7,12 @@ function update!(x::AbstractArray, x̄)
end
function update!(opt, x, )
if == nothing
= zeros(size(x)...)
end
update!(x, -apply!(opt, x, ))
x .-= apply!(opt, x, )
end
function update!(opt, xs::Params, gs)
for x in xs
gs[x] == nothing && continue
update!(opt, x, gs[x])
end
end
@ -25,6 +23,7 @@ runall(f) = f
runall(fs::AbstractVector) = () -> foreach(call, fs)
struct StopException <: Exception end
"""
stop()