public class SDLinalg extends SDOps
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
cholesky(SDVariable input)
Computes the Cholesky decomposition of one or more square matrices.
|
SDVariable |
cholesky(String name,
SDVariable input)
Computes the Cholesky decomposition of one or more square matrices.
|
SDVariable |
cross(SDVariable a,
SDVariable b)
Computes pairwise cross product.
|
SDVariable |
cross(String name,
SDVariable a,
SDVariable b)
Computes pairwise cross product.
|
SDVariable |
diag_part(SDVariable input)
Calculates diagonal tensor.
|
SDVariable |
diag_part(String name,
SDVariable input)
Calculates diagonal tensor.
|
SDVariable |
diag(SDVariable input)
Calculates diagonal tensor.
|
SDVariable |
diag(String name,
SDVariable input)
Calculates diagonal tensor.
|
SDVariable |
logdet(SDVariable input)
Calculates log of determinant.
|
SDVariable |
logdet(String name,
SDVariable input)
Calculates log of determinant.
|
SDVariable |
lstsq(SDVariable matrix,
SDVariable rhs,
double l2_reguralizer)
Solver for linear squares problems.
|
SDVariable |
lstsq(SDVariable matrix,
SDVariable rhs,
double l2_reguralizer,
boolean fast)
Solver for linear squares problems.
|
SDVariable |
lstsq(String name,
SDVariable matrix,
SDVariable rhs,
double l2_reguralizer)
Solver for linear squares problems.
|
SDVariable |
lstsq(String name,
SDVariable matrix,
SDVariable rhs,
double l2_reguralizer,
boolean fast)
Solver for linear squares problems.
|
SDVariable |
lu(SDVariable input)
Computes LU decomposition.
|
SDVariable |
lu(String name,
SDVariable input)
Computes LU decomposition.
|
SDVariable |
matmul(SDVariable a,
SDVariable b)
Performs matrix mutiplication on input tensors.
|
SDVariable |
matmul(String name,
SDVariable a,
SDVariable b)
Performs matrix mutiplication on input tensors.
|
SDVariable[] |
matrixBandPart(SDVariable input,
int minLower,
int maxUpper)
Copy a tensor setting outside a central band in each innermost matrix.
|
SDVariable[] |
matrixBandPart(String[] names,
SDVariable input,
int minLower,
int maxUpper)
Copy a tensor setting outside a central band in each innermost matrix.
|
SDVariable |
mmul(SDVariable x,
SDVariable y)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
SDVariable |
mmul(SDVariable x,
SDVariable y,
boolean transposeX,
boolean transposeY,
boolean transposeZ)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
SDVariable |
mmul(String name,
SDVariable x,
SDVariable y)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
SDVariable |
mmul(String name,
SDVariable x,
SDVariable y,
boolean transposeX,
boolean transposeY,
boolean transposeZ)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
SDVariable[] |
qr(SDVariable input)
Computes the QR decompositions of input matrix.
|
SDVariable[] |
qr(SDVariable input,
boolean full)
Computes the QR decompositions of input matrix.
|
SDVariable[] |
qr(String[] names,
SDVariable input)
Computes the QR decompositions of input matrix.
|
SDVariable[] |
qr(String[] names,
SDVariable input,
boolean full)
Computes the QR decompositions of input matrix.
|
SDVariable |
solve(SDVariable matrix,
SDVariable rhs)
Solver for systems of linear equations.
|
SDVariable |
solve(SDVariable matrix,
SDVariable rhs,
boolean adjoint)
Solver for systems of linear equations.
|
SDVariable |
solve(String name,
SDVariable matrix,
SDVariable rhs)
Solver for systems of linear equations.
|
SDVariable |
solve(String name,
SDVariable matrix,
SDVariable rhs,
boolean adjoint)
Solver for systems of linear equations.
|
SDVariable |
svd(SDVariable input,
boolean fullUV,
boolean computeUV)
Calculates singular value decomposition.
|
SDVariable |
svd(SDVariable input,
boolean fullUV,
boolean computeUV,
int switchNum)
Calculates singular value decomposition.
|
SDVariable |
svd(String name,
SDVariable input,
boolean fullUV,
boolean computeUV)
Calculates singular value decomposition.
|
SDVariable |
svd(String name,
SDVariable input,
boolean fullUV,
boolean computeUV,
int switchNum)
Calculates singular value decomposition.
|
SDVariable |
tri(DataType dataType,
int row,
int column,
int diagonal)
An array with ones at and below the given diagonal and zeros elsewhere.
|
SDVariable |
tri(int row,
int column)
An array with ones at and below the given diagonal and zeros elsewhere.
|
SDVariable |
tri(String name,
DataType dataType,
int row,
int column,
int diagonal)
An array with ones at and below the given diagonal and zeros elsewhere.
|
SDVariable |
tri(String name,
int row,
int column)
An array with ones at and below the given diagonal and zeros elsewhere.
|
SDVariable |
triangularSolve(SDVariable matrix,
SDVariable rhs,
boolean lower,
boolean adjoint)
Solver for systems of linear questions.
|
SDVariable |
triangularSolve(String name,
SDVariable matrix,
SDVariable rhs,
boolean lower,
boolean adjoint)
Solver for systems of linear questions.
|
SDVariable |
triu(SDVariable input)
Upper triangle of an array.
|
SDVariable |
triu(SDVariable input,
int diag)
Upper triangle of an array.
|
SDVariable |
triu(String name,
SDVariable input)
Upper triangle of an array.
|
SDVariable |
triu(String name,
SDVariable input,
int diag)
Upper triangle of an array.
|
public SDLinalg(SameDiff sameDiff)
public SDVariable cholesky(SDVariable input)
input - Input tensor with inner-most 2 dimensions forming square matrices (NUMERIC type)public SDVariable cholesky(String name, SDVariable input)
name - name May be null. Name for the output variableinput - Input tensor with inner-most 2 dimensions forming square matrices (NUMERIC type)public SDVariable lstsq(SDVariable matrix, SDVariable rhs, double l2_reguralizer, boolean fast)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerfast - fast mode, defaults to Truepublic SDVariable lstsq(String name, SDVariable matrix, SDVariable rhs, double l2_reguralizer, boolean fast)
name - name May be null. Name for the output variablematrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerfast - fast mode, defaults to Truepublic SDVariable lstsq(SDVariable matrix, SDVariable rhs, double l2_reguralizer)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerpublic SDVariable lstsq(String name, SDVariable matrix, SDVariable rhs, double l2_reguralizer)
name - name May be null. Name for the output variablematrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerpublic SDVariable lu(SDVariable input)
input - input tensor (NUMERIC type)public SDVariable lu(String name, SDVariable input)
name - name May be null. Name for the output variableinput - input tensor (NUMERIC type)public SDVariable matmul(SDVariable a, SDVariable b)
a - input tensor (NUMERIC type)b - input tensor (NUMERIC type)public SDVariable matmul(String name, SDVariable a, SDVariable b)
name - name May be null. Name for the output variablea - input tensor (NUMERIC type)b - input tensor (NUMERIC type)public SDVariable[] matrixBandPart(SDVariable input, int minLower, int maxUpper)
input - input tensor (NUMERIC type)minLower - lower diagonal countmaxUpper - upper diagonal countpublic SDVariable[] matrixBandPart(String[] names, SDVariable input, int minLower, int maxUpper)
names - names May be null. Arrays of names for the output variables.input - input tensor (NUMERIC type)minLower - lower diagonal countmaxUpper - upper diagonal countpublic SDVariable[] qr(SDVariable input, boolean full)
input - input tensor (NUMERIC type)full - full matrices modepublic SDVariable[] qr(String[] names, SDVariable input, boolean full)
names - names May be null. Arrays of names for the output variables.input - input tensor (NUMERIC type)full - full matrices modepublic SDVariable[] qr(SDVariable input)
input - input tensor (NUMERIC type)public SDVariable[] qr(String[] names, SDVariable input)
names - names May be null. Arrays of names for the output variables.input - input tensor (NUMERIC type)public SDVariable solve(SDVariable matrix, SDVariable rhs, boolean adjoint)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)adjoint - adjoint mode, defaults to Falsepublic SDVariable solve(String name, SDVariable matrix, SDVariable rhs, boolean adjoint)
name - name May be null. Name for the output variablematrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)adjoint - adjoint mode, defaults to Falsepublic SDVariable solve(SDVariable matrix, SDVariable rhs)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)public SDVariable solve(String name, SDVariable matrix, SDVariable rhs)
name - name May be null. Name for the output variablematrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)public SDVariable triangularSolve(SDVariable matrix, SDVariable rhs, boolean lower, boolean adjoint)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)lower - defines whether innermost matrices in matrix are lower or upper triangularadjoint - adjoint modepublic SDVariable triangularSolve(String name, SDVariable matrix, SDVariable rhs, boolean lower, boolean adjoint)
name - name May be null. Name for the output variablematrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)lower - defines whether innermost matrices in matrix are lower or upper triangularadjoint - adjoint modepublic SDVariable cross(SDVariable a, SDVariable b)
a - (NUMERIC type)b - (NUMERIC type)public SDVariable cross(String name, SDVariable a, SDVariable b)
name - name May be null. Name for the output variablea - (NUMERIC type)b - (NUMERIC type)public SDVariable diag(SDVariable input)
input - (NUMERIC type)public SDVariable diag(String name, SDVariable input)
name - name May be null. Name for the output variableinput - (NUMERIC type)public SDVariable diag_part(SDVariable input)
input - (NUMERIC type)public SDVariable diag_part(String name, SDVariable input)
name - name May be null. Name for the output variableinput - (NUMERIC type)public SDVariable logdet(SDVariable input)
input - (NUMERIC type)public SDVariable logdet(String name, SDVariable input)
name - name May be null. Name for the output variableinput - (NUMERIC type)public SDVariable mmul(SDVariable x, SDVariable y, boolean transposeX, boolean transposeY, boolean transposeZ)
x - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)transposeX - Transpose x (first argument)transposeY - Transpose y (second argument)transposeZ - Transpose result arraypublic SDVariable mmul(String name, SDVariable x, SDVariable y, boolean transposeX, boolean transposeY, boolean transposeZ)
name - name May be null. Name for the output variablex - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)transposeX - Transpose x (first argument)transposeY - Transpose y (second argument)transposeZ - Transpose result arraypublic SDVariable mmul(SDVariable x, SDVariable y)
x - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)public SDVariable mmul(String name, SDVariable x, SDVariable y)
name - name May be null. Name for the output variablex - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)public SDVariable svd(SDVariable input, boolean fullUV, boolean computeUV, int switchNum)
input - (NUMERIC type)fullUV - computeUV - switchNum - public SDVariable svd(String name, SDVariable input, boolean fullUV, boolean computeUV, int switchNum)
name - name May be null. Name for the output variableinput - (NUMERIC type)fullUV - computeUV - switchNum - public SDVariable svd(SDVariable input, boolean fullUV, boolean computeUV)
input - (NUMERIC type)fullUV - computeUV - public SDVariable svd(String name, SDVariable input, boolean fullUV, boolean computeUV)
name - name May be null. Name for the output variableinput - (NUMERIC type)fullUV - computeUV - public SDVariable tri(DataType dataType, int row, int column, int diagonal)
dataType - Data typerow - column - diagonal - public SDVariable tri(String name, DataType dataType, int row, int column, int diagonal)
name - name May be null. Name for the output variabledataType - Data typerow - column - diagonal - public SDVariable tri(int row, int column)
row - column - public SDVariable tri(String name, int row, int column)
name - name May be null. Name for the output variablerow - column - public SDVariable triu(SDVariable input, int diag)
input - (NUMERIC type)diag - public SDVariable triu(String name, SDVariable input, int diag)
name - name May be null. Name for the output variableinput - (NUMERIC type)diag - public SDVariable triu(SDVariable input)
input - (NUMERIC type)public SDVariable triu(String name, SDVariable input)
name - name May be null. Name for the output variableinput - (NUMERIC type)Copyright © 2021. All rights reserved.