class_docstr: Implements a restart decay used internally in PowerSign and AddSign optimizers.
  
  It has been proposed in `Neural Optimizer Search with Reinforcement Learning`_.
  
  Arguments:
      T_max (int): the total number of training steps
          to be used to compute internal decays
      num_periods: number of half periods of cosine from 0 to T_max (default: 1)
      zero_after: if not None, number after which 0 is returned
  
  .. _Neural Optimizer Search with Reinforcement Learning:
      https://arxiv.org/abs/1709.07417
code: def __init__(self, T_max, num_periods=1, zero_after=None):
      super(RestartCosineInternalDecay, self).__init__(T_max)
      if zero_after is not None and zero_after < 0:
          raise ValueError("zero_after should be >= 0.")
      self.num_periods = num_periods
      self.zero_after = zero_after
  
file_path: pywick/pywick/optimizers/sign_internal_decay.py
imports: import math
label_desc: Use image node_id 1 to create a new RestartCosineInternalDecay object from inherited base classes: _SignInternalDecay with example: obj = RestartCosineInternalDecay(T_max, num_periods, zero_after)