class_docstr: Convert a PIL image to Multi-resolution Crops. The input is a PIL image and output is the list of image crops.
  
  This transform was proposed in SwAV - https://arxiv.org/abs/2006.09882
  This transform can act as a base transform class for SimCLR, SwAV, and Barlow Twins from VISSL.
  
  This transform has been modified from the ImgPilToMultiCrop code present at
  https://github.com/facebookresearch/vissl/blob/master/vissl/data/ssl_transforms/img_pil_to_multicrop.py
  
  Args:
      total_num_crops (int): Total number of crops to extract
      num_crops (List or Tuple of ints): Specifies the number of `type' of crops.
      size_crops (List or Tuple of ints): Specifies the height (height = width) of each patch
      crop_scales (List or Tuple containing [float, float]): Scale of the crop
      gaussian_blur (bool): Specifies if the transforms' composition has Gaussian Blur
      jitter_strength (float): Specify the coefficient for color jitter transform
      normalize (Optional): Normalize transform from torchvision with params set according to the dataset
class_docstr_tok: ["Convert","a","PIL","image","to","Multi-resolution","Crops",".","The","input","is","a","PIL","image","and","output","is","the","list","of","image","crops",".","This","transform","was","proposed","in","SwAV","-","https",":","\/\/arxiv.org\/abs\/2006.09882","This","transform","can","act","as","a","base","transform","class","for","SimCLR",",","SwAV",",","and","Barlow","Twins","from","VISSL",".","This","transform","has","been","modified","from","the","ImgPilToMultiCrop","code","present","at","https",":","\/\/github.com\/facebookresearch\/vissl\/blob\/master\/vissl\/data\/ssl_transforms\/img_pil_to_multicrop.py","Args",":","total_num_crops","(","int",")",":","Total","number","of","crops","to","extract","num_crops","(","List","or","Tuple","of","ints",")",":","Specifies","the","number","of","`","type","'","of","crops",".","size_crops","(","List","or","Tuple","of","ints",")",":","Specifies","the","height","(","height","=","width",")","of","each","patch","crop_scales","(","List","or","Tuple","containing","[","float",",","float","]",")",":","Scale","of","the","crop","gaussian_blur","(","bool",")",":","Specifies","if","the","transforms","'","composition","has","Gaussian","Blur","jitter_strength","(","float",")",":","Specify","the","coefficient","for","color","jitter","transform","normalize","(","Optional",")",":","Normalize","transform","from","torchvision","with","params","set","according","to","the","dataset"]
code: def per_sample_transform(self) -> Callable:
      color_jitter = pth_transforms.ColorJitter(
          0.8 * self.jitter_strength,
          0.8 * self.jitter_strength,
          0.8 * self.jitter_strength,
          0.2 * self.jitter_strength,
      )
      color_transform = [
          pth_transforms.RandomApply([color_jitter], p=0.8),
          pth_transforms.RandomGrayscale(p=0.2),
      ]
  
      if self.gaussian_blur:
          kernel_size = int(0.1 * self.size_crops[0])
          if kernel_size % 2 == 0:
              kernel_size += 1
  
          color_transform.append(
              pth_transforms.RandomApply(
                  [
                      pth_transforms.GaussianBlur(
                          kernel_size=kernel_size
                      )
                  ],
                  p=0.5,
              )
          )
  
      color_transform = pth_transforms.Compose(color_transform)
  
      final_transform = self._get_final_transform()
  
      transforms = []
      for num, size, scale in zip(
          self.num_crops, self.size_crops, self.crop_scales
      ):
          transforms.extend(
              [
                  pth_transforms.Compose(
                      [
                          pth_transforms.RandomResizedCrop(
                              size, scale=scale
                          ),
                          pth_transforms.RandomHorizontalFlip(p=0.5),
                          color_transform,
                          final_transform,
                      ]
                  )
              ]
              * num
          )
  
      return partial(self._parallel_apply, transforms)
  
file_path: lightning-flash/src/flash/image/embedding/vissl/transforms/multicrop.py
imports: from dataclasses import dataclass, field
  from functools import partial
  from typing import Any, Callable, Dict, Optional, Sequence
  import torch.nn
  from torch.utils.data._utils.collate import default_collate
  from flash.core.data.io.input import DataKeys
  from flash.core.data.io.input_transform import InputTransform
  from flash.core.utilities.imports import _TORCHVISION_AVAILABLE
label_desc: Use image node_id 4 for calling the StandardMultiCropSSLTransform obj's underlying member method code with example usage: obj.per_sample_transform() and returns: partial