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)
      self.criterion = SwaVLoss()
  
file_path: lightly/examples/pytorch_lightning/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()