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 _update_history(self):
      # momentum update
      iter = int(self.iter)
      m = self.mmt
      dist = {}
      for name, p in self.backbone.named_parameters():
          dist[name] = p
  
      if iter == 0:
          for name, p in self.backbone_hist.named_parameters():
              p.data.copy_(dist[name].data)
  
      for name, p in self.backbone_hist.named_parameters():
          p.data = dist[name].data * (1.0 - m) + p.data * m
  
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 4 for calling the ContrastiveModel obj's underlying member method code with example usage: obj._update_history() without return types