update for arrays
This commit is contained in:
parent
c70276ddfe
commit
92ddc618f8
|
@ -1,6 +1,11 @@
|
|||
using Juno
|
||||
import Zygote: Params, gradient
|
||||
|
||||
function update!(x::AbstractArray, x̄)
|
||||
x .+= x̄
|
||||
return x
|
||||
end
|
||||
|
||||
function update!(opt, x, x̄)
|
||||
update!(x, -apply!(opt, x, x̄))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue