-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I think indexed_iterate
should be defined either in CR or handled as intrinsic in AD engine?
MWE:
using Yota
A = Matrix(Hermitian(rand(4, 4)))
function test_f(A)
λ, v = eigen(A)
return sum(λ[1:1]) + sum(2.0 * v[:, 1])
end
Yota.grad(test_f, A)
julia> Yota.grad(test_f, A)
ERROR: No deriative rule found for op %13 = indexed_iterate(%4, 2, %11)::Tuple{Matrix{Float64}, Val{:done}} , try defining it using
ChainRulesCore.rrule(::typeof(Base.indexed_iterate), ::Eigen{Float64, Float64, Matrix{Float64}, Vector{Float64}}, ::Int64, ::Val{:vectors}) = ...
Metadata
Metadata
Assignees
Labels
No labels