utility method

This commit is contained in:
Mike J Innes 2017-08-23 17:50:49 +01:00
parent e4e9794f5e
commit d162e028bb

View File

@ -50,6 +50,8 @@ function back!(x::TrackedArray, Δ)
back!(x.f, Δ)
end
back!(x::TrackedScalar) = back!(x, 1)
macro back!(x, Δ)
quote
x = $(esc(x))