learning.split

Contents

learning.split#

bartorch.learning.split()#

Partition the acquired samples into a set to reconstruct from and a set held out.

Self-supervised training by data undersampling (SSDU) reconstructs from one part of the acquired samples and evaluates the loss on the other, in k-space, so that no fully sampled reference is needed. Drawing a new partition at each step gives the multi-mask variant.

The held-out samples are drawn without replacement among the acquired entries of pattern outside the keep region. With a Gaussian density the probability of an entry falls with its distance from the centre of the pattern, as a centred k-space is sampled; "uniform" is for a pattern over readouts – spokes, interleaves, shots – whose index is not a position in k-space.

Parameters:
  • pattern (torch.Tensor) – The acquired samples, nonzero where acquired: a Cartesian sampling pattern over its phase-encode axes, or a mask over the readouts of a non-Cartesian trajectory, broadcast onto the k-space over its leading axes and wherever it has an extent of one.

  • fraction (float, default=0.4) – Share of the acquired samples outside keep that is held out.

  • density ({"gaussian", "uniform"}, default="gaussian") – How the held-out samples are distributed over pattern.

  • width (float, default=0.5) – Standard deviation of the Gaussian density, relative to the extent of each axis.

  • keep (sequence of int, default=None) – Extent, along each axis of pattern, of a central region whose samples all stay in the set reconstructed from, such as the calibration region.

  • generator (torch.Generator, default=None) – Source of the random draw.

Returns:

reconstruct, held – Disjoint float masks of pattern’s shape whose sum is the acquired mask.

Return type:

torch.Tensor

References

Yaman B, Hosseini SAH, Moeller S, Ellermann J, Ugurbil K, Akcakaya M. Self-supervised learning of physics-guided reconstruction neural networks without fully sampled reference data. Magn Reson Med 2020;84:3172-3191.