Comments (4)
- https://github.com/LuxDL/Lux.jl/blob/main/test/enzyme_tests.jl should be a good starting point. There are other AD tests as well but they are sprinkled in other general numeric tests, so no point unnecessarily dabbling with those.
- Once these work, I can try enabling DI in LuxTestUtils
- FluxML/Flux.jl#2469 (comment) the testing code here should work, just do it on the parameters instead of the model
from lux.jl.
Thanks! In the file you linked, the source of truth seems to be Zygote? What would you use to validate the Zygote gradients themselves?
from lux.jl.
Currently I compute with Zygote and then test against other backends based on the device
- For CPU
- Tracker
- ReverseDiff
- ForwardDiff (if the array sizes are < 100)
- FiniteDifferences
- Enzyme (currently only tested in that file, but testing is being increased more here)
- For GPU
- Tracker
- ForwardDiff in certain situations depending on the problem
Tracker and Zygote hit very different code paths in LuxLib (Zygote is the optimized one with often handwritten rules). In case of conflict/mismatch, the general assumption is that Tracker (on GPU) or FiniteDifferences (on CPU) is the source of truth.
from lux.jl.
I have been meaning to try out FiniteDiff to validate the GPU gradients but haven't had the time to set it up.
from lux.jl.
Related Issues (20)
- Feature request: Bidirectional for RNN layer. HOT 11
- Predefined loss functions HOT 1
- Static Type Parameters not accessible inside `@compact` HOT 1
- Auto detect and warn against performance pitfalls
- Add documentation about how to partial tests. HOT 2
- Feature request: 1D CNN, i.e. keras.layer.Conv1d HOT 6
- AMDGPU CI stalls
- Inference using `NN :: Chain` inside a GPU kernel HOT 4
- custom `show` is often not valid julia syntax to reconstruct
- Meta Issue for Reactant Compilation of Lux Models HOT 1
- Roadmap to v1 HOT 1
- Enzyme wrappers for AD utilities in Lux
- Error in `compute_gradients` when loss already has a `Zygote.gradient` HOT 6
- NCCL Complex wrapper HOT 1
- Drop `Tracker.jl` support for SimpleChains
- Feature request: TimeDistributed Layer HOT 1
- Feature Request: Allow recurrent layers with 2D input (features * seq_length), even if the order is BatchLastIndex HOT 2
- Missing statistics tracking in normalization layers
- unexpected parameter type for AbstractExplicitContainer with single trainable field HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lux.jl.