mr2.nn.data_consistency.GradientDescentDC

class mr2.nn.data_consistency.GradientDescentDC[source]

Bases: Module

Gradient descent data consistency.

Performs gradient descent steps on \(\|Ax - k\|_2^2\) where \(A\) is the acquisition operator and \(k\) is the data.

Parameters:
  • initial_stepsize (float | Tensor) – Initial stepsize. The stepsize is a trainable parameter. Must be a positive scalar.

  • n_steps (int, default: 1) – Number of gradient descent steps.

Returns:

The updated image.

__init__(initial_stepsize: float | Tensor, n_steps: int = 1) → None[source]

Initialize the gradient descent data consistency.

Parameters:
  • initial_stepsize (float | Tensor) – Initial stepsize. The stepsize is a trainable parameter. Must be a positive scalar.

  • n_steps (int, default: 1) – Number of gradient descent steps.

__call__(image: Tensor, data: KData, acquisition_operator: LinearOperator | None = None) → Tensor[source]
__call__(image: Tensor, data: Tensor, acquisition_operator: LinearOperator) → Tensor

Apply the data consistency.

Parameters:
  • image (Tensor) – Current image estimate.

  • data (KData | Tensor) – k-space data.

  • acquisition_operator (LinearOperator | None, default: None) – Acquisition operator matching the k-space data. If None and data is provided as a KData object, the Fourier operator is automatically created from the data.

Returns:

Updated image estimate.

forward(image: Tensor, data: KData | Tensor, acquisition_operator: LinearOperator | None = None) → Tensor[source]

Apply the data consistency.