Add new-style diagm to tracker
This commit is contained in:
parent
44ccdb7ca9
commit
9f9803eec6
@ -309,6 +309,9 @@ end
|
|||||||
|
|
||||||
# BLAS
|
# BLAS
|
||||||
|
|
||||||
|
LinearAlgebra.diagm(x::Pair{<:Integer, <:TrackedVector}) = track(diagm, x)
|
||||||
|
@grad diagm(x::Pair) = diagm(x[1] => data(x[2])), Δ -> (diag(Δ, x[1]),)
|
||||||
|
|
||||||
LinearAlgebra.diagm(x::TrackedVector) = track(diagm, x)
|
LinearAlgebra.diagm(x::TrackedVector) = track(diagm, x)
|
||||||
@grad diagm(x) = diagm(data(x)), Δ -> (diag(Δ),)
|
@grad diagm(x) = diagm(data(x)), Δ -> (diag(Δ),)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user