class_docstr: Implementation of SimSiam[0] network
  
  Recommended loss: :py:class:`lightly.loss.sym_neg_cos_sim_loss.SymNegCosineSimilarityLoss`
  
  [0] SimSiam, 2020, https://arxiv.org/abs/2011.10566
  
  Attributes:
      backbone:
          Backbone model to extract features from images.
      num_ftrs:
          Dimension of the embedding (before the projection head).
      proj_hidden_dim:
          Dimension of the hidden layer of the projection head. This should
          be the same size as `num_ftrs`.
      pred_hidden_dim:
          Dimension of the hidden layer of the predicion head. This should
          be `num_ftrs` / 4.
      out_dim:
          Dimension of the output (after the projection head).
code: def __init__(
      self,
      backbone: nn.Module,
      num_ftrs: int = 2048,
      proj_hidden_dim: int = 2048,
      pred_hidden_dim: int = 512,
      out_dim: int = 2048,
  ):
      super(SimSiam, self).__init__()
  
      self.backbone = backbone
      self.num_ftrs = num_ftrs
      self.proj_hidden_dim = proj_hidden_dim
      self.pred_hidden_dim = pred_hidden_dim
      self.out_dim = out_dim
  
      self.projection_mlp = SimSiamProjectionHead(
          num_ftrs,
          proj_hidden_dim,
          out_dim,
      )
  
      self.prediction_mlp = SimSiamPredictionHead(
          out_dim,
          pred_hidden_dim,
          out_dim,
      )
  
      warnings.warn(
          Warning(
              "The high-level building block SimSiam will be deprecated in version 1.3.0. "
              + "Use low-level building blocks instead. "
              + "See https://docs.lightly.ai/self-supervised-learning/lightly.models.html for more information"
          ),
          DeprecationWarning,
      )
  
file_path: lightly/lightly/models/simsiam.py
imports: import warnings
  import torch
  import torch.nn
  from lightly.models.modules import SimSiamPredictionHead, SimSiamProjectionHead
label_desc: Use image node_id 1 to create a new SimSiam object from inherited base classes: nn with example: obj = SimSiam(backbone, num_ftrs, proj_hidden_dim, pred_hidden_dim, out_dim)