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
In particular I don't know where Zygote generates an adjoint for the `mapreduce` machinery, since there is no custom adjoint, and where it calls `accum` and would appreciate help finding out where.
However, all of the following work on my pr branch, so there is something strange about using a range / generic iterator with shape in the MWE
Zygote.gradient(p ->sum(prod(x) for x in Iterators.product(p, p)), fill(1.0))
Zygote.gradient(p ->sum(prod(x) for x in Iterators.product(p, 1.0)), fill(1.0))
Zygote.gradient(p ->sum(prod(x) for x in Iterators.product(p, [1.0])), fill(1.0))
I know that Zygote performs better with arrays than iterators, since iterators can contain arbitrary code and are hard to optimize, but I would like to try helping make the generic code work.
The text was updated successfully, but these errors were encountered:
Aha, it's probably because of the following definition of accum, which is reminiscent of the behavior of an old Julia bug. This is fixed by #1489 and #1491 together and I will keep the issue open until those are resolved.
Hi,
I've been working on #1489 and I can't figure out where the following code breaks
Stacktrace
However, all of the following work on my pr branch, so there is something strange about using a range / generic iterator with shape in the MWE
I know that Zygote performs better with arrays than iterators, since iterators can contain arbitrary code and are hard to optimize, but I would like to try helping make the generic code work.
The text was updated successfully, but these errors were encountered: