tfmri.linalg.LinearOperatorDiag

class LinearOperatorDiag(diag, rank, is_non_singular=None, is_self_adjoint=None, is_positive_definite=None, is_square=True, name='LinearOperatorDiag')[source]

Bases: tensorflow_mri.python.util.linalg_imaging.LinalgImagingMixin, tensorflow.python.ops.linalg.linear_operator_diag.LinearOperatorDiag

Linear operator representing a square diagonal matrix.

This operator acts like a [batch] diagonal matrix A with shape [B1, ..., Bb, N, N] for some b >= 0. The first b indices index a batch member. For every batch index (i1, ..., ib), A[i1, ..., ib, : :] is an N x N matrix. This matrix A is not materialized, but for purposes of broadcasting this shape will be relevant.

Parameters
  • diag – A tf.Tensor of shape [B1, ..., Bb, *S].

  • rank – An int. The rank of S. Must be <= diag.shape.rank.

  • is_non_singular – Expect that this operator is non-singular.

  • is_self_adjoint – Expect that this operator is equal to its Hermitian transpose. If diag is real, this is auto-set to True.

  • is_positive_definite – Expect that this operator is positive definite, meaning the quadratic form \(x^H A x\) has positive real part for all nonzero \(x\). Note that we do not require the operator to be self-adjoint to be positive-definite.

  • is_square – Expect that this operator acts like square [batch] matrices.

  • name – A name for this LinearOperator.

Initialize the LinearOperator. (deprecated arguments)

Deprecated: SOME ARGUMENTS ARE DEPRECATED: (graph_parents). They will be removed in a future version. Instructions for updating: Do not pass graph_parents. They will no longer be used.

This is a private method for subclass use. Subclasses should copy-paste this ``__init__`` documentation.

Parameters
  • dtype – The type of the this LinearOperator. Arguments to matmul and solve will have to be this type.

  • graph_parents – (Deprecated) Python list of graph prerequisites of this LinearOperator Typically tensors that are passed during initialization

  • is_non_singular – Expect that this operator is non-singular.

  • is_self_adjoint – Expect that this operator is equal to its hermitian transpose. If dtype is real, this is equivalent to being symmetric.

  • is_positive_definite – Expect that this operator is positive definite, meaning the quadratic form x^H A x has positive real part for all nonzero x. Note that we do not require the operator to be self-adjoint to be positive-definite. See: https://en.wikipedia.org/wiki/Positive-definite_matrix#Extension_for_non-symmetric_matrices

  • is_square – Expect that this operator acts like square [batch] matrices.

  • name – A name for this LinearOperator.

  • parameters – Python dict of parameters used to instantiate this LinearOperator.

Raises
  • ValueError – If any member of graph_parents is None or not a Tensor.

  • ValueError – If hints are set incorrectly.