All Projects → philzook58 → ad-lens

philzook58 / ad-lens

Licence: BSD-3-Clause license
Automatic Differentiation using Pseudo Lenses. Neat.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to ad-lens

Fmatvec
A fast vector/matrix library
Stars: ✭ 5 (-68.75%)
Mutual labels:  vector, matrices
sparse
Sparse matrix formats for linear algebra supporting scientific and machine learning applications
Stars: ✭ 136 (+750%)
Mutual labels:  vector, matrices
Sharpmath
A small .NET math library.
Stars: ✭ 36 (+125%)
Mutual labels:  vector, matrices
gmath
Lightweight C++ geometry math library (Vectors, Quaternions and Matrices)
Stars: ✭ 33 (+106.25%)
Mutual labels:  vector, matrices
graphmath
An Elixir library for performing 2D and 3D mathematics.
Stars: ✭ 72 (+350%)
Mutual labels:  vector, matrices
BitLens
🔎 Have your bits and eat them too! A C++17 bit lens container for vector types.
Stars: ✭ 20 (+25%)
Mutual labels:  vector, lens
SCF4-SDK
Motorized zoom lens controller Kurokesu SCF4 module featuring STM32 controller and Onsemi LC898201 driver control software
Stars: ✭ 14 (-12.5%)
Mutual labels:  lens
Swiftish
A fully generic Swift vector & matrix library
Stars: ✭ 17 (+6.25%)
Mutual labels:  vector
JOLI.jl
Julia Operators LIbrary
Stars: ✭ 14 (-12.5%)
Mutual labels:  vector
vsc-material-theme-icons
Material Theme Icons, the most epic icons theme for Visual Studio Code and Material Theme.
Stars: ✭ 90 (+462.5%)
Mutual labels:  vector
dopt
A numerical optimisation and deep learning framework for D.
Stars: ✭ 28 (+75%)
Mutual labels:  automatic-differentiation
YaoBlocks.jl
Standard basic quantum circuit simulator building blocks. (archived, for it is moved to Yao.jl)
Stars: ✭ 26 (+62.5%)
Mutual labels:  automatic-differentiation
grass-addons
GRASS GIS Addons Repository (Manuals: https://grass.osgeo.org/grass-stable/manuals/addons/ | Linux-logs: https://grass.osgeo.org/addons/grass8/logs/ | Windows logs: https://wingrass.fsv.cvut.cz/grass82/addons/grass-8.2.0/logs/)
Stars: ✭ 64 (+300%)
Mutual labels:  vector
safe-svg
Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
Stars: ✭ 129 (+706.25%)
Mutual labels:  vector
vector2d
2D Vector Library. Operates using Objects, Array or Float32Array types to allow flexible performance.
Stars: ✭ 28 (+75%)
Mutual labels:  vector
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (+31.25%)
Mutual labels:  vector
AbstractOperators.jl
Abstract operators for large scale optimization in Julia
Stars: ✭ 26 (+62.5%)
Mutual labels:  automatic-differentiation
velcro
Collection initialization macros for Rust
Stars: ✭ 45 (+181.25%)
Mutual labels:  vector
preface
Preface is an opinionated library designed to facilitate the handling of recurring functional programming idioms in OCaml.
Stars: ✭ 116 (+625%)
Mutual labels:  category-theory
LandscapeView
Animated landscape generator
Stars: ✭ 89 (+456.25%)
Mutual labels:  vector

ad-lens

These blog posts try to explain a bit about what is going on here

http://www.philipzucker.com/reverse-mode-auto-differentiation-kind-like-lens/

http://www.philipzucker.com/reverse-mode-differentiation-is-kind-of-like-a-lens-ii/

http://www.philipzucker.com/bidirectional-applicative-programming-and-automatic-differentation/

http://www.philipzucker.com/neural-networks-with-weighty-lenses-dioptics/

Check out the test directory for some usage examples

A lens is a getter and setter pair a -> (b, (b->a)). This is also the signature of reverse mode automatic differentiation. The function (b->a) is the transposed Jacobian (using a function representation of Matrices. Matrices are a certain kind of Vector -> Vector functions).

We use the standard Lens trick to make these functions composable via (.).

TODO: Higher order derivatives ReExport safe pieces of standard Lens library Try Accelerate GPU lib More Combinators Recursion Schemes

ad-lens

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].