class_docstr: Implementation of `Lookahead Optimizer: k steps forward, 1 step back <https://arxiv.org/abs/1907.08610>`_
  
  Args:
      :param optimizer:       - the optimizer to work with (sgd, adam etc)
      :param k: (int)         - number of steps to look ahead (default=5)
      :param alpha: (float)   - slow weights step size
docstr: :param optimizer:       - the optimizer to work with (sgd, adam etc)
  :param k: (int)         - number of steps to look ahead (default=5)
  :param alpha: (float)   - slow weights step size
code: def __init__(self, optimizer, k=5, alpha=0.5):
      """
      :param optimizer:       - the optimizer to work with (sgd, adam etc)
      :param k: (int)         - number of steps to look ahead (default=5)
      :param alpha: (float)   - slow weights step size
      """
      self.optimizer = optimizer
      self.k = k
      self.alpha = alpha
      self.param_groups = self.optimizer.param_groups
      self.state = defaultdict(dict)
      self.fast_state = self.optimizer.state
      for group in self.param_groups:
          group["counter"] = 0
  
file_path: pywick/pywick/optimizers/lookahead.py
imports: from collections import defaultdict
  from torch.optim.optimizer import Optimizer
  import torch
label_desc: Use image node_id 1 to create a new Lookahead object from inherited base classes: Optimizer with example: obj = Lookahead(optimizer, k, alpha)