Comments (4)
Ok so the problem is that my R is rank-defficient, and the inverse (which is done using trtrs) fails. I made sure my R's are now full rank and everything appears to work (as in, I now get different errors probably unrelated to backwardslinalg)
from backwardslinalg.jl.
Thanks for you feedback. Yes, that happens sometime. LinearAlgebra backward functions have the problem of exploding gradients.
Now I am finding an approach to solve this problem one for all. The instruction level automatic differentiation on a reversible eDSL NiLang. Here is the code for a naive implementation of QR (without re-orthogonalization)
https://github.com/GiggleLiu/NiLang.jl/blob/master/project/qr.jl
This is in research stage and is not ready for productivity (it does not use BLAS!). Hopefully it can solve the gradient exploding problem in the future.
from backwardslinalg.jl.
LinearAlgebra backward functions have the problem of exploding gradients.
When do they have this problem? I know svd has it, but I assumed that the backward differentiation of qr was stable (because the one inverse step is well behaved as long as R is well behaved).
How does nilang address this issue? I thought the exploding gradients had their origin in the inversion steps and I don't understand how you can prevent this.
from backwardslinalg.jl.
svd, symeig have the spectrum degeneracy problem. QR (especially for rectangular matrices) has the rank deficiency problem in this implementation.
NiLang differentiate basic components, the floating point operations, rather than using manually derived formulas.
It depends on how forward program works. Like the Jacobi method in
https://web.stanford.edu/class/cme335/lecture7.pdf
Differentiating each instruction faithfully does not have a know caveat for now. Not sure it can solve the problem.
from backwardslinalg.jl.
Related Issues (12)
- References
- Batched SVD
- GPU support HOT 2
- return `SVD` and `QR` types to stay compatible with julialang
- register the package HOT 15
- For registration HOT 1
- register HOT 3
- QR with pivoting? HOT 3
- Working with QR gradients HOT 2
- Consider string literal interface HOT 1
- Merge into ChainRules? HOT 2
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 backwardslinalg.jl.