class_docstr: Implements incremental block distributed data parallelism similar to
  https://ieeexplore.ieee.org/document/7472805
  
  Paper title: Scalable training of deep learning machines by incremental
  block training with intra-block parallel optimization and blockwise
  model-update filtering
class_docstr_tok: ["Implements","incremental","block","distributed","data","parallelism","similar","to","https",":","\/\/ieeexplore.ieee.org\/document\/7472805","Paper","title",":","Scalable","training","of","deep","learning","machines","by","incremental","block","training","with","intra-block","parallel","optimization","and","blockwise","model-update","filtering"]
code: def _reset_local_data(self):
      # (Step-0) Initialize global momentum parameters and store global copy on each gpu
      self.global_params = [
          torch.zeros_like(p.data) for p in self.params
      ]
      self.smoothed_grads = [
          p.data.new_zeros(p.data.size()) for p in self.params
      ]
      self.grads = [
          p.data.new_zeros(p.data.size()) for p in self.params
      ]
  
      # saving the global model locally for calculating gradient during bmuf sync
      for param, global_param in zip(self.params, self.global_params):
          global_param.copy_(param.data)
  
imports: from dataclasses import dataclass, field
  import torch
  import torch.distributed
  from fairseq.dataclass.configs import FairseqBMUFConfig
  from fairseq.dataclass.utils import gen_parser_from_dataclass
  from fairseq.optim.fairseq_optimizer import FairseqOptimizer
label_desc: Use image node_id 20 for calling the FairseqBMUF obj's underlying member method code with example usage: obj._reset_local_data() without return types