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
Attempting to ProjectTo a ZeroTangent from ChainRulesCore.jl onto a BlockDiagonal gives a method error, complaining that the operation is ambiguous:
using ChainRulesCore, BlockDiagonals
a =randn(2,2)
bd =BlockDiagonal([a,a])
julia>ProjectTo(bd)(ChainRulesCore.ZeroTangent())
# ERROR: MethodError: (::ProjectTo{BlockDiagonal, NamedTuple{(:blocks, :blocksizes), Tuple{Vector{ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}, Vector{Tuple{Int64, Int64}}}}})(::ZeroTangent) is ambiguous. Candidates:# (project::ProjectTo{BlockDiagonal})(dx) in BlockDiagonals at /home/sam/.julia/packages/BlockDiagonals/rUwoj/src/chainrules.jl:87# (::ProjectTo{T})(dx::AbstractZero) where T in ChainRulesCore at /home/sam/.julia/packages/ChainRulesCore/sHMAp/src/projection.jl:120# Possible fix, define# (::ProjectTo{BlockDiagonal})(::AbstractZero)# Stacktrace:# [1] top-level scope# @ REPL[6]:1
This was on 1.7.0 with the following environment:
(jl_vzzVL5) pkg> st
Status `/tmp/jl_vzzVL5/Project.toml`
[0a1fb500] BlockDiagonals v0.1.24
[d360d2e6] ChainRulesCore v1.11.2
The text was updated successfully, but these errors were encountered:
Attempting to
ProjectTo
aZeroTangent
fromChainRulesCore.jl
onto aBlockDiagonal
gives a method error, complaining that the operation is ambiguous:This was on 1.7.0 with the following environment:
The text was updated successfully, but these errors were encountered: