code: def __init__(self):
      super().__init__()
      resnet = torchvision.models.resnet18()
      self.backbone = nn.Sequential(*list(resnet.children())[:-1])
      self.projection_head = BarlowTwinsProjectionHead(512, 2048, 2048)
      self.criterion = BarlowTwinsLoss()
  
file_path: lightly/examples/pytorch_lightning/barlowtwins.py
imports: import pytorch_lightning
  import torch
  import torchvision
  from torch import nn
  from lightly.loss import BarlowTwinsLoss
  from lightly.models.modules import BarlowTwinsProjectionHead
  from lightly.transforms.byol_transform import BYOLTransform, BYOLView1Transform, BYOLView2Transform
label_desc: Use image node_id 1 to create a new BarlowTwins object from inherited base classes: pl with example: obj = BarlowTwins()