docstr: Update center used for teacher output.
docstr_tok: ["Update","center","used","for","teacher","output","."]
code: def update_center(self):
      """
      Update center used for teacher output.
      """
      batch_center = torch.sum(self.teacher_output, dim=0, keepdim=True)
      dist.all_reduce(batch_center)
      batch_center = batch_center / (
          len(self.teacher_output) * get_world_size()
      )
  
      # ema update
      center_momentum = self.loss_config.ema_center
      self.center = self.center * center_momentum + batch_center * (
          1 - center_momentum
      )
  
imports: import logging
  import pprint
  from typing import List
  import torch
  import torch.distributed
  import torch.nn.functional
  from classy_vision.generic.distributed_util import get_cuda_device_index, get_world_size, is_distributed_training_run
  from classy_vision.losses import ClassyLoss, register_loss
  from fairscale.nn import FullyShardedDataParallel
  from vissl.config import AttrDict
  from vissl.models.model_helpers import get_no_ddp_model
label_desc: Use image node_id 5 for calling the DINOLoss obj's underlying member method code with example usage: obj.update_center() without return types