class_docstr: Bootstrap Your Own Latent A New Approach to Self-Supervised Learning
  Details can be found in:
  https://arxiv.org/pdf/2006.07733.pdf
class_docstr_tok: ["Bootstrap","Your","Own","Latent","A","New","Approach","to","Self-Supervised","Learning","Details","can","be","found","in",":","https",":","\/\/arxiv.org\/pdf\/2006.07733.pdf"]
docstr: Args:
      backbone (nn.Module): backbone for byol, input shape depends on the forward
          input size. Standard inputs include `B x C`, `B x C x H x W`, and
          `B x C x T x H x W`.
      projector (nn.Module): An mlp with 2 to 3 hidden layers,
          with (synchronized) BatchNorm and ReLU activation.
      backbone_mmt (nn.Module): backbone for byol, input shape depends on the forward
          input size. Standard inputs include `B x C`, `B x C x H x W`, and
          `B x C x T x H x W`.
      projector_mmt (nn.Module): Am mlp with 2 to 3 hidden layers,
          with (synchronized) BatchNorm and ReLU activation.
      predictor (nn.Module): predictor MLP of BYOL of similar structure as the
          projector MLP.
      mmt (float): momentum update ratio for the momentum backbone.
docstr_tok: ["Args",":","backbone","(","nn.Module",")",":","backbone","for","byol",",","input","shape","depends","on","the","forward","input","size",".","Standard","inputs","include","`","B","x","C","`",",","`","B","x","C","x","H","x","W","`",",","and","`","B","x","C","x","T","x","H","x","W","`",".","projector","(","nn.Module",")",":","An","mlp","with","2","to","3","hidden","layers",",","with","(","synchronized",")","BatchNorm","and","ReLU","activation",".","backbone_mmt","(","nn.Module",")",":","backbone","for","byol",",","input","shape","depends","on","the","forward","input","size",".","Standard","inputs","include","`","B","x","C","`",",","`","B","x","C","x","H","x","W","`",",","and","`","B","x","C","x","T","x","H","x","W","`",".","projector_mmt","(","nn.Module",")",":","Am","mlp","with","2","to","3","hidden","layers",",","with","(","synchronized",")","BatchNorm","and","ReLU","activation",".","predictor","(","nn.Module",")",":","predictor","MLP","of","BYOL","of","similar","structure","as","the","projector","MLP",".","mmt","(","float",")",":","momentum","update","ratio","for","the","momentum","backbone","."]
code: def __init__(
      self,
      mmt: float,
      backbone: nn.Module,
      predictor: nn.Module,
      backbone_mmt: nn.Module,
      projector: Optional[nn.Module] = None,
      projector_mmt: Optional[nn.Module] = None,
  ) -> None:
      """
      Args:
          backbone (nn.Module): backbone for byol, input shape depends on the forward
              input size. Standard inputs include `B x C`, `B x C x H x W`, and
              `B x C x T x H x W`.
          projector (nn.Module): An mlp with 2 to 3 hidden layers,
              with (synchronized) BatchNorm and ReLU activation.
          backbone_mmt (nn.Module): backbone for byol, input shape depends on the forward
              input size. Standard inputs include `B x C`, `B x C x H x W`, and
              `B x C x T x H x W`.
          projector_mmt (nn.Module): Am mlp with 2 to 3 hidden layers,
              with (synchronized) BatchNorm and ReLU activation.
          predictor (nn.Module): predictor MLP of BYOL of similar structure as the
              projector MLP.
          mmt (float): momentum update ratio for the momentum backbone.
      """
      super().__init__()
  
      self.mmt: float = mmt
      if projector is not None:
          backbone = nn.Sequential(
              backbone,
              projector,
          )
      init_net_weights(backbone)
      self.backbone = backbone
  
      if projector_mmt is not None:
          backbone_mmt = nn.Sequential(
              backbone_mmt,
              projector_mmt,
          )
      init_net_weights(backbone_mmt)
      self.backbone_mmt = backbone_mmt
  
      for p in self.backbone_mmt.parameters():
          p.requires_grad = False
  
      init_net_weights(predictor)
      self.predictor = predictor
  
      self._copy_weights_to_backbone_mmt()
  
imports: from dataclasses import dataclass
  from typing import Any, Callable, List, Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from hydra.core.config_store import ConfigStore
  from omegaconf import MISSING
  from pytorchvideo.models.resnet import create_resnet
  from pytorchvideo.models.weight_init import init_net_weights
  from pytorchvideo_trainer.module.ssl_helper import create_mlp_util, SSLBaseModule
  from pytorchvideo_trainer.module.video_classification import Batch, BatchKey, EnsembleMethod
  from torchrecipes.core.conf import ModuleConf
  from torchrecipes.utils.config_utils import get_class_name_str
label_desc: Use image node_id 1 to create a new BYOL object from inherited base classes: nn with example: obj = BYOL(mmt, backbone, predictor, backbone_mmt, projector, projector_mmt)