Zygote.jl icon indicating copy to clipboard operation
Zygote.jl copied to clipboard

pullbacks for dict constructors

Open CarloLucibello opened this issue 2 years ago • 0 comments

Trying to fix #1293 With respect to master the case

gradient(2) do c
  d = Dict([i => i*c for i=1:3])
  return d[1] 
end

is now fixed, but I haven't cracked the generator case yet

gradient(2) do c
  d = Dict(i => i*c for i=1:3)
  return d[1] 
end

I've tried by composing pullbacks but so far it's been unsuccessful.

CarloLucibello avatar Dec 01 '22 07:12 CarloLucibello