https://github.com/fluxml/zygoterules.jl
https://github.com/fluxml/zygoterules.jl
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fluxml/zygoterules.jl
- Owner: FluxML
- License: mit
- Created: 2019-07-30T14:47:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-24T03:03:11.000Z (over 1 year ago)
- Last Synced: 2025-02-23T02:03:01.845Z (over 1 year ago)
- Language: Julia
- Size: 40 KB
- Stars: 15
- Watchers: 6
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZygoteRules.jl
This is a minimal (<100sloc) package which enables you to add custom gradients to Zygote, without depending on Zygote itself.
Usage:
```julia
foo(a, b) = a*b
using ZygoteRules
@adjoint foo(a, b) = a*b, c̄ -> (b'c̄, a'c̄)
```
See the Zygote docs for more details on how to write custom gradients.