class_docstr: Create image patches from a torch Tensor or numpy array.
  This transform was proposed in Jigsaw - https://arxiv.org/abs/1603.09246
  
  Args:
      num_patches (int): how many image patches to create
      patch_jitter (int): space to leave between patches
docstr: Input image which is a torch.Tensor object of shape 3 x H x W
docstr_tok: ["Input","image","which","is","a","torch.Tensor","object","of","shape","3","x","H","x","W"]
code: def __call__(self, image):
      """
      Input image which is a torch.Tensor object of shape 3 x H x W
      """
      data = []
      grid_size = int(image.shape[1] / self.grid_side_len)
      patch_size = grid_size - self.patch_jitter
      jitter = np.random.randint(
          0,
          self.patch_jitter,
          (2, self.grid_side_len, self.grid_side_len),
      )
  
      for i in range(self.grid_side_len):
          for j in range(self.grid_side_len):
              x_offset = i * grid_size
              y_offset = j * grid_size
              grid_cell = image[
                  :,
                  y_offset : y_offset + grid_size,
                  x_offset : x_offset + grid_size,
              ]
  
              patch = grid_cell[
                  :,
                  jitter[1, i, j] : jitter[1, i, j] + patch_size,
                  jitter[0, i, j] : jitter[0, i, j] + patch_size,
              ]
              assert (
                  patch.shape[1] == patch_size
              ), "Image not cropped properly"
              assert (
                  patch.shape[2] == patch_size
              ), "Image not cropped properly"
              # copy patch data so that all patches are different in underlying memory
              data.append(np.copy(patch))
      return data
  
file_path: vissl/vissl/data/ssl_transforms/img_patches_tensor.py
imports: import logging
  import math
  from typing import Any, Dict
  import numpy
  from classy_vision.dataset.transforms import register_transform
  from classy_vision.dataset.transforms.classy_transform import ClassyTransform
label_desc: Use image node_id 2 for calling the ImgPatchesFromTensor obj's underlying member method code with example usage: obj.__call__(image) and returns: data