class_docstr: `MADGRAD Optimizer`: A Momentumized, Adaptive, Dual Averaged Gradient Method for Stochastic
  Optimization.
  Paper: https://arxiv.org/abs/2101.11075
  
  Implementation has been copied over from the original author
  (https://github.com/facebookresearch/madgrad/blob/master/madgrad/madgrad.py)
class_docstr_tok: ["`","MADGRAD","Optimizer","`",":","A","Momentumized",",","Adaptive",",","Dual","Averaged","Gradient","Method","for","Stochastic","Optimization",".","Paper",":","https",":","\/\/arxiv.org\/abs\/2101.11075","Implementation","has","been","copied","over","from","the","original","author","(","https",":","\/\/github.com\/facebookresearch\/madgrad\/blob\/master\/madgrad\/madgrad.py",")"]
code: def initialize_state(self):
      for group in self.param_groups:
          for p in group["params"]:
              if p not in self.state:
                  state = self.state[p]
                  state["grad_sum_sq"] = torch.zeros_like(
                      p.data
                  ).detach()
                  state["s"] = torch.zeros_like(p.data).detach()
                  if self.momentum != 0:
                      state["x0"] = torch.clone(p.data).detach()
  
file_path: pytext/pytext/optimizer/madgrad.py
imports: import math
  from collections import defaultdict
  from typing import Optional
  import torch
  from torch.optim.optimizer import Optimizer
  from .optimizers import Optimizer
label_desc: Use image node_id 3 for calling the MADGRAD obj's underlying member method code with example usage: obj.initialize_state() without return types