update for arrays

This commit is contained in:
Mike J Innes 2019-04-05 17:17:50 +01:00 committed by Elliot Saba
parent c70276ddfe
commit 92ddc618f8
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,11 @@
using Juno
import Zygote: Params, gradient
function update!(x::AbstractArray, )
x .+=
return x
end
function update!(opt, x, )
update!(x, -apply!(opt, x, ))
end