patch_denoise.gpu.dataloader.patchify_tensor#

patch_denoise.gpu.dataloader.patchify_tensor(data, patch_shape, patch_overlap)[source]#

Transform a tensor into a collection of patches with specified shape and overlap.

Parameters:
  • data (torch.Tensor) – The input tensor.

  • patch_shape (tuple of int) – The shape of each patch.

  • patch_overlap (tuple of int) – The number of overlapping elements between adjacent patches along each dimension

Returns:

A view of the original tensor containing the extracted patches, with shape (grid_patches, *patch_shape).

Return type:

torch.Tensor