Skip to content
/ expm Public

Differentiable and numerically stable implementation of the matrix exponential

License

Notifications You must be signed in to change notification settings

lezcano/expm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

As of PyTorch 1.7.0, the matrix exponential is supported natively by PyTorch under the name matrix_exp

https://pytorch.org/docs/master/generated/torch.matrix_exp.html?highlight=matrix_exp#torch.matrix_exp

Use the PyTorch native implementation rather than this one in your project if you can as it is faster

Two differentiable implementations of the exponential of matrices in Pytorch.

They implement the papers:

The Taylor implementation should run faster in GPU, as it does not require of a QR decomposition.

The Taylor implementation supports batches of square matrices of shape (*, n ,n).

The Taylor implementation is done entirely in Pytorch.

The Pade implementation requires Scipy. It is itself an adaptation of the implementation of expm in Scipy.

About

Differentiable and numerically stable implementation of the matrix exponential

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages