/levmarq-torch

PyTorch implementation of the Levenberg-Marquardt algorithm.

Primary LanguagePythonMIT LicenseMIT

PyPI version

levmarq-torch

A basic PyTorch implementation of the Levenberg-Marquardt algorithm. This solves minimization problems of the form

$$\mathbf{x}^* = \mathrm{argmin}_{\mathbf{x}} |\mathbf{y} - \mathbf{\hat{y}}(\mathbf{x})|^2 , .$$

The implementation is batched over the parameters $\mathbf{x}$ and datapoints $\mathbf{y}$.

Based on implementation 1 from Gavin 2022 and some help from Connor Stone.

Installation

Just run pip install levmarq-torch.