code: def __init__(self):
      super().__init__()
      resnet = torchvision.models.resnet18()
      self.backbone = nn.Sequential(*list(resnet.children())[:-1])
      self.projection_head = SwaVProjectionHead(512, 512, 128)
      self.prototypes = SwaVPrototypes(128, n_prototypes=512)
  
      # enable sinkhorn_gather_distributed to gather features from all gpus
      # while running the sinkhorn algorithm in the loss calculation
      self.criterion = SwaVLoss(sinkhorn_gather_distributed=True)
  
file_path: lightly/examples/pytorch_lightning_distributed/swav.py
imports: import pytorch_lightning
  import torch
  import torchvision
  from torch import nn
  from lightly.loss import SwaVLoss
  from lightly.models.modules import SwaVProjectionHead, SwaVPrototypes
  from lightly.transforms.swav_transform import SwaVTransform
label_desc: Use image node_id 1 to create a new SwaV object from inherited base classes: pl with example: obj = SwaV()