class_docstr: This class uses a convolutional model to learn coil sensitivity maps for multi-coil MRI reconstruction.
  The convolutional model is :py:class:`monai.apps.reconstruction.networks.nets.complex_unet` by default
  but can be specified by the user as well. Learning is done on the center of the under-sampled
  kspace (that region is fully sampled).
  
  The data being a (complex) 2-channel tensor is a requirement for using this model.
  
  Modified and adopted from: https://github.com/facebookresearch/fastMRI
  
  Args:
      spatial_dims: number of spatial dimensions.
      features: six integers as numbers of features. denotes number of channels in each layer.
      act: activation type and arguments. Defaults to LeakyReLU.
      norm: feature normalization type and arguments. Defaults to instance norm.
      bias: whether to have a bias term in convolution blocks. Defaults to True.
      dropout: dropout ratio. Defaults to 0.0.
      upsample: upsampling mode, available options are
          ``"deconv"``, ``"pixelshuffle"``, ``"nontrainable"``.
      coil_dim: coil dimension in the data
      conv_net: the learning model used to estimate the coil sensitivity maps. default
          is :py:class:`monai.apps.reconstruction.networks.nets.complex_unet`. The only
          requirement on the model is to have 2 as input and output number of channels.
docstr: Args:
      masked_kspace: the under-sampled kspace (which is the input measurement). Its shape
          is (B,C,H,W,2) for 2D data or (B,C,H,W,D,2) for 3D data.
      mask: the under-sampling mask with shape (1,1,1,W,1) for 2D data or (1,1,1,1,D,1) for 3D data.
  
  Returns:
      predicted coil sensitivity maps with shape (B,C,H,W,2) for 2D data or (B,C,H,W,D,2) for 3D data.
docstr_tok: ["Args",":","masked_kspace",":","the","under-sampled","kspace","(","which","is","the","input","measurement",")",".","Its","shape","is","(","B",",","C",",","H",",","W,2",")","for","2D","data","or","(","B",",","C",",","H",",","W",",","D,2",")","for","3D","data",".","mask",":","the","under-sampling","mask","with","shape","(","1,1,1",",","W,1",")","for","2D","data","or","(","1,1,1,1",",","D,1",")","for","3D","data",".","Returns",":","predicted","coil","sensitivity","maps","with","shape","(","B",",","C",",","H",",","W,2",")","for","2D","data","or","(","B",",","C",",","H",",","W",",","D,2",")","for","3D","data","."]
code: def forward(self, masked_kspace: Tensor, mask: Tensor) -> Tensor:
      """
      Args:
          masked_kspace: the under-sampled kspace (which is the input measurement). Its shape
              is (B,C,H,W,2) for 2D data or (B,C,H,W,D,2) for 3D data.
          mask: the under-sampling mask with shape (1,1,1,W,1) for 2D data or (1,1,1,1,D,1) for 3D data.
  
      Returns:
          predicted coil sensitivity maps with shape (B,C,H,W,2) for 2D data or (B,C,H,W,D,2) for 3D data.
      """
      left, right = self.get_fully_sampled_region(mask)
      num_low_freqs = right - left  # size of the fully-sampled center
  
      # take out the fully-sampled region and set the rest of the data to zero
      x = torch.zeros_like(masked_kspace)
      start = (
          mask.shape[-2] - num_low_freqs + 1
      ) // 2  # this marks the start of center extraction
      x[..., start : start + num_low_freqs, :] = masked_kspace[
          ..., start : start + num_low_freqs, :
      ]
  
      # apply inverse fourier to the extracted fully-sampled data
      x = ifftn_centered_t(
          x, spatial_dims=self.spatial_dims, is_complex=True
      )
  
      x, b = reshape_channel_to_batch_dim(
          x
      )  # shape of x will be (B*C,1,...)
      x = self.conv_net(x)
      x = reshape_batch_channel_to_channel_dim(
          x, b
      )  # shape will be (B,C,...)
      # normalize the maps
      x = x / root_sum_of_squares_t(
          x, spatial_dim=self.coil_dim
      ).unsqueeze(self.coil_dim)
  
      return x
  
file_path: MONAI/monai/apps/reconstruction/networks/nets/coil_sensitivity_model.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  import torch.nn
  from torch import Tensor
  from monai.apps.reconstruction.mri_utils import root_sum_of_squares_t
  from monai.apps.reconstruction.networks.nets.complex_unet import ComplexUnet
  from monai.apps.reconstruction.networks.nets.utils import reshape_batch_channel_to_channel_dim, reshape_channel_to_batch_dim
  from monai.networks.blocks.fft_utils_t import ifftn_centered_t
label_desc: Use image node_id 3 for calling the CoilSensitivityModel obj's underlying member method code with example usage: obj.forward(masked_kspace, mask) and returns: x