Skip to content

cossio/ZygoteStructArrays.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZygoteStructArrays.jl

Defines Zygote adjoint rules for StructArrays.

Usage

Install with ] add ZygoteStructArrays. Then simply import ZygoteStructArrays and the adjoint rules will just work.

Examples

Try to run the following code (without loading this package first):

using Zygote, StructArrays
gradient(randn(2), randn(2)) do X,Y
    S = StructArray{Complex}((X,Y))
    sum(S).re + 2sum(S).im
end

You will get an error. Now load this package and run that again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages