-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
I have the following code snippet that tries to calculate the gradient of the following expression:
where
import LinearAlgebra: kron
import LinearMaps: LinearMap
import Zygote: gradient, Params
function kronprod(x::AbstractVector{Float64}, c::AbstractVector{Float64})
x_map = LinearMap(x)
return sum(kron(x_map, x_map)' * c)
end
x = rand(16);
c = rand(16 * 16);
g = gradient(Params([x])) do
kronprod(x, c)
end
@show gUpon executing it, I receive the following error message:
ERROR: LoadError: MethodError: no method matching (LinearMaps.WrappedMap{Float64})(::Vector{Float64}; issymmetric::Bool, ishermitian::Bool, isposdef::Bool)
This error has been manually thrown, explicitly, so the method may exist but be intentionally marked as unimplemented.
Closest candidates are:
(LinearMaps.WrappedMap{T})(::AbstractVector; issym, isherm, ispd) where T got unsupported keyword arguments "issymmetric", "ishermitian", "isposdef"
@ LinearMaps ~/.julia/packages/LinearMaps/GRDXH/src/wrappedmap.jl:13
(LinearMaps.WrappedMap{T})(::Union{AbstractMatrix{T}, LinearAlgebra.AbstractQ{T}, LinearMap{T}} where T; issymmetric, ishermitian, isposdef) where T
@ LinearMaps ~/.julia/packages/LinearMaps/GRDXH/src/wrappedmap.jl:7
The first candidate method includes keyword arguments issym, isherm, ispd instead of issymmetric, ishermitian, etc. A quick search reveals that they are only used in WrappedMap. Is this intentional?
Metadata
Metadata
Assignees
Labels
No labels