class_docstr: The model averaging is based on paper
  "Stochastic Gradient Descent for Non-smooth Optimization: Convergence
  Results and Optimal Averaging Schemes",
  (http://proceedings.mlr.press/v28/shamir13.pdf), which implements
  polynomial-decay averaging, parameterized by eta. When eta = 0, it is
  equivalent to simple average over all iterations with same weights.
docstr: Parameters
  ----------
  eta
      Parameter of polynomial-decay averaging.
docstr_tok: ["Parameters","--","--","--","--","--","eta","Parameter","of","polynomial-decay","averaging","."]
code: def __init__(self, eta: float = 0):
      r"""
      Parameters
      ----------
      eta
          Parameter of polynomial-decay averaging.
      """
  
      self.eta = eta
      # Dict that maintains the averaged model parameters.
      self.averaged_model = None
      # Temporarily save the current model, so that the averaged model can be
      # used for validation.
      self.cached_model = None
      # The number of models accumulated in the average.
      self.average_counter = 0
      # Indicate whether the model averaging has started.
      self.averaging_started = False
  
imports: from typing import Any, Dict, List, Optional
  import logging
  import mxnet
  import mxnet.gluon.nn
  from mxnet import gluon
  from gluonts.core.component import validated
  from .callback import Callback
label_desc: Use image node_id 1 to create a new IterationAveragingStrategy object  with example: obj = IterationAveragingStrategy(eta)