Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Implementation-agnostic linear algebra optimisations for Reverse-Mode AD

License

Notifications You must be signed in to change notification settings

invenia/DiffLinearAlgebra.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiffLinearAlgebra

Note: the current version of this package is not intended for general consumption.

Build Status Windows Build status codecov.io DiffLinearAlgebra DiffLinearAlgebra

DiffLinearAlgebra can be (very loosely) thought of as DiffRules.jl for linear algebra. For every sensitivity, we provide a function which, when provided with the input and output from the forward pass and the reverse-mode sensitvity w.r.t the output from the forward pass, computes the sensitivity of the specified argument.

  A, B = randn(5, 3), randn(3, 4)
  C, C̄ = A * B, randn(5, 4)
  Ā = (*, Val{1}, (), C, C̄, A, B)
  B̄ = (*, Val{2}, (), C, C̄, A, B)

In the above example, the sensitivities of A and B are computed from C and a random seeding of . (Note that the third argument is currently redundant; see this issue for motivation for its inclusion.)

We also expose some "metadata" for each implemented sensitivity. This is done via a set called ops contains DiffOp structs. These structs contain information regarding the arguments types supported by each sensitivity, and which arguments are differentiable.

About

Implementation-agnostic linear algebra optimisations for Reverse-Mode AD

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages