You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code snippet that tries to calculate the gradient of the following expression:
$$
x \mapsto \langle \mathbf{vec}(x x^{\mathsf{T}}), c \rangle = \langle x \otimes x, c \rangle,
$$
where $\otimes$ denotes the Kronecker product and $c$ is an appropriately-sized vector. I was using the following snippet of code:
import LinearAlgebra: kron
import LinearMaps: LinearMap
import Zygote: gradient, Params
functionkronprod(x::AbstractVector{Float64}, c::AbstractVector{Float64})
x_map =LinearMap(x)
returnsum(kron(x_map, x_map)'* c)
end
x =rand(16);
c =rand(16*16);
g =gradient(Params([x])) dokronprod(x, c)
end@show g
Upon 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?
The text was updated successfully, but these errors were encountered:
I have the following code snippet that tries to calculate the gradient of the following expression:
where$\otimes$ denotes the Kronecker product and $c$ is an appropriately-sized vector. I was using the following snippet of code:
Upon executing it, I receive the following error message:
The first candidate method includes keyword arguments
issym
,isherm
,ispd
instead ofissymmetric
,ishermitian
, etc. A quick search reveals that they are only used inWrappedMap
. Is this intentional?The text was updated successfully, but these errors were encountered: