class_docstr: Randomly mask out one or more patches from an image.
  Args:
      n_holes (int): Number of patches to cut out of each image.
      length (int): The length (in pixels) of each square patch.
docstr: Args:
      img (Tensor): Tensor image of size (C, H, W).
  Returns:
      Tensor: Image with n_holes of dimension length x length cut out of it.
docstr_tok: ["Args",":","img","(","Tensor",")",":","Tensor","image","of","size","(","C",",","H",",","W",")",".","Returns",":","Tensor",":","Image","with","n_holes","of","dimension","length","x","length","cut","out","of","it","."]
code: def __call__(self, img):
      """
      Args:
          img (Tensor): Tensor image of size (C, H, W).
      Returns:
          Tensor: Image with n_holes of dimension length x length cut out of it.
      """
      h_img, w_img = img.size(1), img.size(2)
      mask = np.ones((h_img, w_img), np.float32)
      y_img = np.random.randint(h_img)
      x_img = np.random.randint(w_img)
  
      y1_img = np.clip(y_img - self.length // 2, 0, h_img)
      y2_img = np.clip(y_img + self.length // 2, 0, h_img)
      x1_img = np.clip(x_img - self.length // 2, 0, w_img)
      x2_img = np.clip(x_img + self.length // 2, 0, w_img)
  
      mask[y1_img:y2_img, x1_img:x2_img] = 0.0
      mask = torch.from_numpy(mask)
      mask = mask.expand_as(img)
      img *= mask
      return img
  
file_path: nni/examples/trials/network_morphism/FashionMNIST/utils.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.init
  import torchvision.transforms
label_desc: Use image node_id 2 for calling the Cutout obj's underlying member method code with example usage: obj.__call__(img) and returns: img