This package implements the Householder transformation algorithm for calculating orthogonal matrices and orthonormal
frames with differentiable bindings to PyTorch. In particular, the package provides an enhanced drop-in replacement for
the torch.orgqr function, which was renamed into torch.linalg.householder_product as of PyTorch 1.9.
APIs for orthogonal transformations have been around since LAPACK; however, their support in the deep learning frameworks is lacking. Recently, orthogonal constraints have become popular in deep learning as a way to regularize models and improve training dynamics, and hence the need to backpropagate through orthogonal transformations arised.
PyTorch 1.7 implements matrix exponential function torch.matrix_exp, which can be repurposed to performing the
orthogonal transformation when the input matrix is skew-symmetric. This is the baseline we use in Speed and Precision
evaluation.
PyTorch 1.9 renamed torch.orgqr into torch.linalg.householder_product, and added support of autograd, batching, and
GPU execution.
Compared to torch.matrix_exp, the Householder transformation implemented in this package has the following advantages:
- Orders of magnitude lower memory footprint
- Ability to transform non-square matrices (orthonormal frames)
- A significant speed-up for non-square matrices
- Better numerical precision for all matrix and batch sizes
Find more details and the most up-to-date information on the project webpage: https://www.github.com/toshas/torch-householder
Metadata
Release files for torch-householder 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| torch_householder-1.0.1.tar.gz | 457.4 kB | Without provenance | Details |
Release files / torch_householder-1.0.1.tar.gz
| Download URL | torch_householder-1.0.1.tar.gz |
|---|---|
| Size | 457.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a4b240c68947491c4e96a78771497562650f9a555001e062a0969fce206f786
|
|
BLAKE2b-256 checksum How to use checksums |
f37da87d4ea6c11f23d237fc81c094a6c18909486fdb9914599479cbeb5d089f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
|
Security for torch-householder 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.