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 noticed during some of my development that StructArrays and Zygote seem to be broken. It seems that if you access a property of the struct array in a function Zygote/ChainRules doesn't maintain the StructArray type and this causes an issue during gradient accumulation. A MWE is
I have been playing with ChainRulesCore and ProjectTo to see if I could get this to work but I am not sure the best way to store everything internally.
Hi All,
I noticed during some of my development that StructArrays and Zygote seem to be broken. It seems that if you access a property of the struct array in a function Zygote/ChainRules doesn't maintain the StructArray type and this causes an issue during gradient accumulation. A MWE is
On the other hand
Seems to work fine and return a StructArray.
I have been playing with ChainRulesCore and ProjectTo to see if I could get this to work but I am not sure the best way to store everything internally.
Working environment
julia> Pkg.status()
Status
/tmp/jl_sssQXD/Project.toml
[09ab397b] StructArrays v0.6.13
https://github.com/JuliaArrays/StructArrays.jl.git#master
[e88e6eb3] Zygote v0.6.51 [09ab397b] StructArrays v0.6.13
https://github.com/JuliaArrays/StructArrays.jl.git#master
[e88e6eb3] Zygote v0.6.51
julia> versioninfo()
Julia Version 1.8.3
Commit 0434deb161e (2022-11-14 20:14 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 32 × AMD Ryzen 9 7950X 16-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
Threads: 1 on 32 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS = 1
The text was updated successfully, but these errors were encountered: