tfmri.linalg.LinearOperatorGramMatrix

class LinearOperatorGramMatrix(operator, reg_parameter=None, reg_operator=None, gram_operator=None, is_non_singular=None, is_self_adjoint=True, is_positive_definite=True, is_square=True, name=None)[source]

Bases: tensorflow_mri.python.util.linalg_imaging.LinearOperator

Linear operator representing the Gram matrix of an operator.

If \(A\) is a LinearOperator, this operator is equivalent to \(A^H A\).

The Gram matrix of \(A\) appears in the normal equation \(A^H A x = A^H b\) associated with the least squares problem \({\mathop{\mathrm{argmin}}_x} {\left \| Ax-b \right \|_2^2}\).

This operator is self-adjoint and positive definite. Therefore, linear systems defined by this linear operator can be solved using the conjugate gradient method.

This operator supports the optional addition of a regularization parameter \(\lambda\) and a transform matrix \(T\). If these are provided, this operator becomes \(A^H A + \lambda T^H T\). This appears in the regularized normal equation \(\left ( A^H A + \lambda T^H T \right ) x = A^H b + \lambda T^H T x_0\), associated with the regularized least squares problem \({\mathop{\mathrm{argmin}}_x} {\left \| Ax-b \right \|_2^2 + \lambda \left \| T(x-x_0) \right \|_2^2}\).

Parameters
  • operator – A tfmri.linalg.LinearOperator. The operator \(A\) whose Gram matrix is represented by this linear operator.

  • reg_parameter – A Tensor of shape [B1, ..., Bb] and real dtype. The regularization parameter \(\lambda\). Defaults to 0.

  • reg_operator

    A tfmri.linalg.LinearOperator. The regularization transform \(T\). Defaults to the identity.

  • gram_operator

    A tfmri.linalg.LinearOperator. The Gram matrix \(A^H A\). This may be optionally provided to use a specialized Gram matrix implementation. Defaults to None.

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

  • is_self_adjoint – Expect that this operator is equal to its Hermitian transpose.

  • 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.