code: def training_step(
      self,
      batch: Tuple[List[Tensor], Tensor, List[str]],
      batch_idx: int,
  ) -> Tensor:
      # Momentum update teacher.
      # Settings follow original code for 100 epochs which are slightly different
      # from the paper, see:
      # https://github.com/deepmind/deepmind-research/blob/f5de0ede8430809180254ee957abf36ed62579ef/byol/configs/byol.py#L21-L23
      momentum = cosine_schedule(
          step=self.trainer.global_step,
          max_steps=self.trainer.estimated_stepping_batches,
          start_value=0.99,
          end_value=1.0,
      )
      update_momentum(self.student_backbone, self.backbone, m=momentum)
      update_momentum(
          self.student_projection_head, self.projection_head, m=momentum
      )
  
      # Forward pass and loss calculation.
      views, targets = batch[0], batch[1]
      teacher_features_0, teacher_projections_0 = self.forward_teacher(
          views[0]
      )
      _, teacher_projections_1 = self.forward_teacher(views[1])
      student_predictions_0 = self.forward_student(views[0])
      student_predictions_1 = self.forward_student(views[1])
      # NOTE: Factor 2 because: L2(norm(x), norm(y)) = 2 - 2 * cossim(x, y)
      loss_0 = 2 * self.criterion(
          teacher_projections_0, student_predictions_1
      )
      loss_1 = 2 * self.criterion(
          teacher_projections_1, student_predictions_0
      )
      # NOTE: No mean because original code only takes mean over batch dimension, not
      # views.
      loss = loss_0 + loss_1
      self.log(
          "train_loss",
          loss,
          prog_bar=True,
          sync_dist=True,
          batch_size=len(targets),
      )
  
      # Online linear evaluation.
      cls_loss, cls_log = self.online_classifier.training_step(
          (teacher_features_0.detach(), targets), batch_idx
      )
      self.log_dict(cls_log, sync_dist=True, batch_size=len(targets))
      return loss + cls_loss
  
imports: import copy
  from typing import List, Tuple
  import torch
  from pytorch_lightning import LightningModule
  from torch import Tensor
  from torch.nn import Identity
  from torchvision.models import resnet50
  from lightly.loss import NegativeCosineSimilarity
  from lightly.models.modules import BYOLPredictionHead, BYOLProjectionHead
  from lightly.models.utils import get_weight_decay_parameters, update_momentum
  from lightly.transforms import BYOLTransform
  from lightly.utils.benchmarking import OnlineLinearClassifier
  from lightly.utils.lars import LARS
  from lightly.utils.scheduler import CosineWarmupScheduler, cosine_schedule
label_desc: Use image node_id 5 for calling the BYOL obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: unknown