class_docstr: This is the loss which was proposed in the "Momentum Contrast
  for Unsupervised Visual Representation Learning" paper, from Kaiming He et al.
  See http://arxiv.org/abs/1911.05722 for details
  and https://github.com/facebookresearch/moco for a reference implementation, reused here
  
  Config params:
      embedding_dim (int): head output output dimension
      queue_size (int): number of elements in queue
      momentum (float): encoder momentum value for the update
      temperature (float): temperature to use on the logits
class_docstr_tok: ["This","is","the","loss","which","was","proposed","in","the","``","Momentum","Contrast","for","Unsupervised","Visual","Representation","Learning","''","paper",",","from","Kaiming","He","et","al",".","See","http",":","\/\/arxiv.org\/abs\/1911.05722","for","details","and","https",":","\/\/github.com\/facebookresearch\/moco","for","a","reference","implementation",",","reused","here","Config","params",":","embedding_dim","(","int",")",":","head","output","output","dimension","queue_size","(","int",")",":","number","of","elements","in","queue","momentum","(","float",")",":","encoder","momentum","value","for","the","update","temperature","(","float",")",":","temperature","to","use","on","the","logits"]
docstr: Restore the loss state given a checkpoint
  
  Args:
      state_dict (serialized via torch.save)
docstr_tok: ["Restore","the","loss","state","given","a","checkpoint","Args",":","state_dict","(","serialized","via","torch.save",")"]
code: def load_state_dict(self, state_dict, *args, **kwargs):
      """
      Restore the loss state given a checkpoint
  
      Args:
          state_dict (serialized via torch.save)
      """
  
      # If the encoder has been allocated, use the normal pytorch restoration
      if self.moco_encoder is None:
          self.checkpoint = state_dict
          logging.info("Storing the checkpoint for later use")
      else:
          logging.info("Restoring checkpoint")
          super().load_state_dict(state_dict, *args, **kwargs)
  
file_path: vissl/vissl/losses/moco_loss.py
imports: import logging
  import pprint
  from collections import namedtuple
  import torch
  from classy_vision.losses import ClassyLoss, register_loss
  from torch import nn
  from vissl.utils.misc import concat_all_gather
label_desc: Use image node_id 6 for calling the MoCoLoss obj's underlying member method code with example usage: obj.load_state_dict(state_dict) without return types