class_docstr: Collator for IJEPA model [0].
  
  Experimental: Support for I-JEPA is experimental, there might be breaking changes
  in the future.
  
  Code inspired by [1].
  
  - [0]: Joint-Embedding Predictive Architecture, 2023, https://arxiv.org/abs/2301.08243
  - [1]: https://github.com/facebookresearch/ijepa
class_docstr_tok: ["Collator","for","IJEPA","model","[","0","]",".","Experimental",":","Support","for","I-JEPA","is","experimental",",","there","might","be","breaking","changes","in","the","future",".","Code","inspired","by","[","1","]",".","-","[","0","]",":","Joint-Embedding","Predictive","Architecture",",","2023",",","https",":","\/\/arxiv.org\/abs\/2301.08243","-","[","1","]",":","https",":","\/\/github.com\/facebookresearch\/ijepa"]
code: def __init__(
      self,
      input_size=(224, 224),
      patch_size=16,
      enc_mask_scale=(0.2, 0.8),
      pred_mask_scale=(0.2, 0.8),
      aspect_ratio=(0.3, 3.0),
      nenc=1,
      npred=2,
      min_keep=4,
      allow_overlap=False,
  ):
      if not isinstance(input_size, tuple):
          input_size = (input_size,) * 2
      self.patch_size = patch_size
      self.height, self.width = (
          input_size[0] // patch_size,
          input_size[1] // patch_size,
      )
      self.enc_mask_scale = enc_mask_scale
      self.pred_mask_scale = pred_mask_scale
      self.aspect_ratio = aspect_ratio
      self.nenc = nenc
      self.npred = npred
      self.min_keep = min_keep  # minimum number of patches to keep
      self.allow_overlap = allow_overlap  # whether to allow overlap b/w enc and pred masks
      self._itr_counter = Value("i", -1)
  
imports: import math
  from multiprocessing import Value
  from typing import List, Optional, Tuple, Union
  from warnings import warn
  import torch
  import torch.nn
  import torchvision
  import torchvision.transforms
  from PIL import Image
  from lightly.transforms import GaussianBlur, Jigsaw, RandomSolarization
  from lightly.transforms.random_crop_and_flip_with_grid import RandomResizedCropAndFlip
  from lightly.transforms.rotation import random_rotation_transform
  from lightly.transforms.utils import IMAGENET_NORMALIZE
label_desc: Use image node_id 1 to create a new IJEPAMaskCollator object  with example: obj = IJEPAMaskCollator(input_size, patch_size, enc_mask_scale, pred_mask_scale, aspect_ratio, nenc, npred, min_keep, allow_overlap)