deepmr.optim.cg_solve

Contents

deepmr.optim.cg_solve#

deepmr.optim.cg_solve = <function cg_solve>#

Solve inverse problem using Conjugate Gradient method.

Parameters:
  • input (np.ndarray | torch.Tensor) – Signal to be reconstructed. Assume it is the adjoint AH of measurement operator A applied to the measured data y (i.e., input = AHy).

  • AHA (Callable | torch.Tensor | np.ndarray) – Normal operator AHA = AH * A.

  • niter (int, optional) – Number of iterations. The default is 10.

  • device (str, optional) – Computational device. The default is None (infer from input).

  • tol (float, optional) – Stopping condition. The default is 1e-4.

  • lamda (float, optional) – Tikhonov regularization strength. The default is 0.0.

  • ndim (int, optional) – Number of spatial dimensions of the problem. It is used to infer the batch axes. If AHA is a deepmr.linop.Linop operator, this is inferred from AHA.ndim and ndim is ignored.

Returns:

output – Reconstructed signal.

Return type:

np.ndarray | torch.Tensor