{"repo":"cvxgrp/torch_linops","free":true,"listed":false,"github":"https://github.com/cvxgrp/torch_linops","clone":"git clone https://github.com/cvxgrp/torch_linops.git","description":"A library to define abstract linear operators, and associated algebra and matrix-free algorithms, that works with pyTorch Tensors.","language":"Python","stars":16,"topics":["linear-algebra","matrix","pytorch"],"license":"Apache-2.0","category":"machine-learning","readme_excerpt":"An Abstract Linear Operator Library for pyTorch This library implements a generic structure for abstract linear operators and enables a number of standard operations on them: Arithmetic: A + B , A - B , -A , A @ B all work exactly as expected to combine linear operators. Indexing: A[k:ell,m:n] works as expected. Solves: Ax = b can be solved with CG for PSD matrices, minres for symmetric matrices, LSQR (to be implemented), or LSMR (to be implemented). Trace estimation: The trace of square matrices, can be estimated via Hutch++ and Hutchinson's estimator. Diamond-Boyd stochastic equilibration Randomized Nyström Preconditioning Automatic adjoint operator generation. Using LinearOperator s The public API of the LinearOperator library is that every LinearOperator has the following properties and methods: The following functions are available in the root of the library: The following functions are available in linops.trace for trace estimation: linops.equilibration contains equilibrate and symmetric equilibrate . Their public API is not finalized, if you wish to use them it is recommend you read the source code. Creating Linear Operators Linear operators can be constructed in the following way: Creating a sub-class of LinearOperator Calling one of the following constructors: IdentityOperator(n: int) DiagonalOperator(diag: torch.Tensor) : where diag is a 1D torch tensor. MatrixOperator(M: torch.Tensor) : where M is a 2D torch tensor. SelectionOperator(shape: tuple[int, int], idxs: s","default_branch":null,"files":null,"tree":[],"storefront":"/r/cvxgrp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/cvxgrp/torch_linops/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}