class_docstr: Contrastive Model, currently mainly focused on memory bank and CSC.
class_docstr_tok: ["Contrastive","Model",",","currently","mainly","focused","on","memory","bank","and","CSC","."]
code: def momentum_anneal_cosine(self, epoch_exact):
      self.mmt = (
          1
          - (1 - self.cfg.CONTRASTIVE.MOMENTUM)
          * (
              math.cos(
                  math.pi * epoch_exact / self.cfg.SOLVER.MAX_EPOCH
              )
              + 1.0
          )
          * 0.5
      )
  
imports: import math
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import slowfast.models.losses
  import slowfast.utils.distributed
  import slowfast.utils.logging
  from slowfast.models.video_model_builder import X3D, MViT, ResNet, SlowFast
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 9 for calling the ContrastiveModel obj's underlying member method code with example usage: obj.momentum_anneal_cosine(epoch_exact) without return types