twodlearn.linalg module¶
-
class
twodlearn.linalg.Cholesky(input, name=None)[source]¶ Bases:
twodlearn.core.common.TdlModelTdl autoinitialization with arguments:
-
input[source]
-
linop[source]
-
value[source]
-
-
class
twodlearn.linalg.DynamicScaledIdentity(**kargs)[source]¶ Bases:
twodlearn.core.common.TdlModelscaled identity [batched] matrix whose size depends on the shape of the input
Tdl autoinitialization with arguments:
-
multipliers[source]¶ (
InputParameter) tensor whose elements represent the multiplier factors for the identity matrices.
-
multipliers[source] tensor whose elements represent the multiplier factors for the identity matrices.
-
tolerance[source]
-
-
twodlearn.linalg.M_times_Mt(M)[source]¶ Compute M @ M^t
- Parameters
M – (batched) matrix M
- Returns
solution of M @ M^t
- Return type
tf.Tensor
-
twodlearn.linalg.Mt_times_M(M)[source]¶ Compute M^t @ M
- Parameters
M – (batched) matrix M
- Returns
solution of M^t @ M
- Return type
tf.Tensor
-
class
twodlearn.linalg.PDMatrix(**kargs)[source]¶ Bases:
twodlearn.core.common.TdlModelPositive definite matrix
Tdl autoinitialization with arguments:
-
shape[source]¶ (
InputArgument) shape of the distribution. The shape assumes the last two dimentions corresponds to the shape of a square matrix
-
batch_shape[source]
-
cholesky[source]
-
domain_dimension[source]
-
linop[source]
-
raw[source]
-
shape[source] shape of the distribution. The shape assumes the last two dimentions corresponds to the shape of a square matrix
-
tolerance[source]
-
value[source]
-
-
class
twodlearn.linalg.PDMatrixDiag(**kargs)[source]¶ Bases:
twodlearn.linalg.PDMatrixTdl autoinitialization with arguments:
-
shape[source]¶ (
InputArgument) shape of the distribution. The shape assumes the last two dimentions corresponds to the shape of a square matrix
-
raw[source]¶ (
SimpleParameter) square root of the diagonal part for the matrices
-
linop[source]
-
raw[source] square root of the diagonal part for the matrices
-
-
class
twodlearn.linalg.PDScaledIdentity(**kargs)[source]¶ Bases:
twodlearn.linalg.PDMatrixDiagTdl autoinitialization with arguments:
-
raw[source]¶ (
InputParameter) multiplier for the identities
-
shape[source]¶ (
InputArgument) shape of the distribution. The shape assumes the last two dimentions corresponds to the shape of a square matrix
-
linop[source]¶ (
SubmodelInit) Autoinit with arguments [‘domain_dimension’]
-
domain_dimension[source]
-
linop[source] Autoinit with arguments [‘domain_dimension’]
-
raw[source] multiplier for the identities
-
-
twodlearn.linalg.diagonal_M_times_Mt(M)[source]¶ Compute M @ M^t for diagonal linop M.
- Parameters
M – (batched) diagonal linear operator
- Returns
solution of M @ M^t
- Return type
tf.Tensor