class_docstr: Adam with SGD updates every n steps with accumulated gradients.
class_docstr_tok: ["Adam","with","SGD","updates","every","n","steps","with","accumulated","gradients","."]
docstr: Create slot variables for Adam with accumulated gradients.
docstr_tok: ["Create","slot","variables","for","Adam","with","accumulated","gradients","."]
code: def _create_slots(self, var_list):
      """Create slot variables for Adam with accumulated gradients."""
      first_var = min(var_list, key=lambda x: x.name)
      self._create_non_slot_variable(
          initial_value=self._beta1,
          name="beta1_power",
          colocate_with=first_var,
      )
      self._create_non_slot_variable(
          initial_value=self._beta2,
          name="beta2_power",
          colocate_with=first_var,
      )
      # if iter is initialized as an int32, this optimizer could not run
      # with tensorflow_hub with a tensorflow-gpu version
      self._create_non_slot_variable(
          initial_value=0.0 if self._n == 1 else 1.0,
          name="iter",
          colocate_with=first_var,
      )
      # Create slots for the first and second moments, as well as grad_acc.
      for v in var_list:
          self._zeros_slot(v, "m", self._name)
          self._zeros_slot(v, "v", self._name)
          self._zeros_slot(v, "grad_acc", self._name)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v1
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.training import training_ops
label_desc: Use image node_id 3 for calling the MultistepAdamOptimizer obj's underlying member method code with example usage: obj._create_slots(var_list) without return types