DoubleTensorAlgebra
Implementation of basic operations over double tensors and basic algebra operations on them.
Inheritors
Functions
Cholesky decomposition.
QR decomposition.
Returns the covariance matrix M
of given vectors.
Computes the determinant of a square matrix input, or of each square matrix in a batched input. For more information: https://pytorch.org/docs/stable/linalg.html#torch.linalg.det
Computes the determinant of a square matrix input, or of each square matrix in a batched input using LU factorization algorithm.
Creates a tensor whose diagonals of certain 2D planes (specified by dim1 and dim2) are filled by diagonalEntries. To facilitate creating batched diagonal matrices, the 2D planes formed by the last two dimensions of the returned tensor are chosen by default.
Matrix product of two tensors.
Constructs a tensor with the specified shape and data.
Creates a tensor of a given shape and fills all elements with a given value.
Returns a tensor with the same shape as input
filled with value.
Computes the multiplicative inverse matrix of a square matrix input, or of each square matrix in a batched input. Given a square matrix A
, return the matrix AInv
satisfying A dot AInv == AInv dot A == eye(a.shape[0])
. For more information: https://pytorch.org/docs/stable/linalg.html#torch.linalg.inv
Computes the multiplicative inverse matrix of a square matrix input, or of each square matrix in a batched input using LU factorization algorithm. Given a square matrix a
, return the matrix aInv
satisfying a dot aInv == aInv dot a == eye(a.shape[0])
.
LUP decomposition
LUP decomposition.
Computes the LU factorization of a matrix or batches of matrices input
. Returns a tuple containing the LU factorization and pivots of input
.
Unpacks the data and pivots from a LU factorization of a tensor. Given a tensor luTensor, return tensors Triple(P, L, U)
satisfying P dot luTensor = L dot U
, with P
being a permutation matrix or batch of matrices, L
being a lower triangular matrix or batch of matrices, U
being an upper triangular matrix or batch of matrices.
Applies the transform function to each element of the tensor and returns the resulting modified tensor.
Broadcasting Matrix product of two tensors.
Returns the maximum value of all elements in the input tensor or null if there are no values
Returns the maximum value of each row of the input tensor in the given dimension dim.
Returns the minimum value of each row of the input tensor in the given dimension dim.
Each element of the tensor arg is subtracted from this value. The resulting tensor is returned.
Subtracts the scalar arg from each element of this tensor and returns a new resulting tensor.
Each element of the tensor arg is subtracted from each element of this tensor. The resulting tensor is returned.
Returns a tensor filled with the scalar value 1.0
, with the shape defined by the variable argument shape.
Returns a tensor filled with the scalar value 1.0
, with the same shape as a given array.
QR decomposition.
Returns a tensor of random numbers drawn from normal distributions with 0.0
mean and 1.0
standard deviation.
Returns a tensor with the same shape as input
of random numbers drawn from normal distributions with 0.0
mean and 1.0
standard deviation.
Builds tensor from rows of the input tensor.
Constructs a tensor with the specified shape and initializer.
Returns the sum of each row of the input tensor in the given dimension dim.
Singular Value Decomposition.
Singular Value Decomposition.
Returns eigenvalues and eigenvectors of a real symmetric matrix input
or a batch of real symmetric matrices, represented by a pair eigenvalues to eigenvectors
. For more information: https://pytorch.org/docs/stable/generated/torch.symeig.html
Returns eigenvalues and eigenvectors of a real symmetric matrix input or a batch of real symmetric matrices, represented by a pair eigenvalues to eigenvectors
.
Numerical negative, element-wise.
Returns a single tensor value of unit dimension. The tensor shape must be equal to 1.
Returns a single tensor value of unit dimension if tensor shape equals to 1.
Returns a new tensor with the same data as the self tensor but of a different shape. The returned tensor shares the same data and must have the same number of elements, but may have a different size For more information: https://pytorch.org/docs/stable/tensor_view.html
View this tensor as the same size as other. this.viewAs(other)
is equivalent to this.view(other.shape)
. For more information: https://pytorch.org/cppdocs/notes/tensor_indexing.html
Compute a value using broadcast double tensor algebra
Returns a tensor filled with the scalar value 0.0
, with the same shape as a given array.
Returns a tensor filled with the scalar value 0.0
, with the shape defined by the variable argument shape.