class_docstr: `AdaBelief Optimizer, adapting stepsizes by the belief in observed gradients`
  Paper: https://arxiv.org/abs/2010.07468
  Implementation has been copied over from the original author (https://github.com/juntang-zhuang/Adabelief-Optimizer)
class_docstr_tok: ["`","AdaBelief","Optimizer",",","adapting","stepsizes","by","the","belief","in","observed","gradients","`","Paper",":","https",":","\/\/arxiv.org\/abs\/2010.07468","Implementation","has","been","copied","over","from","the","original","author","(","https",":","\/\/github.com\/juntang-zhuang\/Adabelief-Optimizer",")"]
code: def reset(self):
      for group in self.param_groups:
          for p in group["params"]:
              state = self.state[p]
              amsgrad = group["amsgrad"]
  
              # State initialization
              state["step"] = 0
              # Exponential moving average of gradient values
              state["exp_avg"] = torch.zeros_like(
                  p.data, memory_format=torch.preserve_format
              )
  
              # Exponential moving average of squared gradient values
              state["exp_avg_var"] = torch.zeros_like(
                  p.data, memory_format=torch.preserve_format
              )
              if amsgrad:
                  # Maintains max of all exp. moving avg. of sq. grad. values
                  state["max_exp_avg_var"] = torch.zeros_like(
                      p.data, memory_format=torch.preserve_format
                  )
  
file_path: pytext/pytext/optimizer/adabelief.py
imports: import math
  import torch
  from torch.optim.optimizer import Optimizer
  from .optimizers import Optimizer
label_desc: Use image node_id 4 for calling the AdaBelief obj's underlying member method code with example usage: obj.reset() without return types