class_docstr: Momentum.
  
  Momentum Optimizer accepts learning rate decay. When training a model,
  it is often recommended to lower the learning rate as the training
  progresses. The function returns the decayed learning rate.  It is
  computed as:
  
  ```python
  decayed_learning_rate = learning_rate *
                        decay_rate ^ (global_step / decay_steps)
  ```
  
  Examples:
      ```python
      # With TFLearn estimators
      momentum = Momentum(learning_rate=0.01, lr_decay=0.96, decay_step=100)
      regression = regression(net, optimizer=momentum)
  
      # Without TFLearn estimators (returns tf.Optimizer)
      mm = Momentum(learning_rate=0.01, lr_decay=0.96).get_tensor()
      ```
  
  Arguments:
      learning_rate: `float`. Learning rate.
      momentum: `float`. Momentum.
      lr_decay: `float`. The learning rate decay to apply.
      decay_step: `int`. Apply decay every provided steps.
      staircase: `bool`. It `True` decay learning rate at discrete intervals.
      use_locking: `bool`. If True use locks for update operation.
      name: `str`. Optional name prefix for the operations created when
          applying gradients. Defaults to "Momentum".
class_docstr_tok: ["Momentum",".","Momentum","Optimizer","accepts","learning","rate","decay",".","When","training","a","model",",","it","is","often","recommended","to","lower","the","learning","rate","as","the","training","progresses",".","The","function","returns","the","decayed","learning","rate",".","It","is","computed","as",":","``","`","python","decayed_learning_rate","=","learning_rate","*","decay_rate","^","(","global_step","\/","decay_steps",")","``","`","Examples",":","``","`","python","#","With","TFLearn","estimators","momentum","=","Momentum","(","learning_rate=0.01",",","lr_decay=0.96",",","decay_step=100",")","regression","=","regression","(","net",",","optimizer=momentum",")","#","Without","TFLearn","estimators","(","returns","tf.Optimizer",")","mm","=","Momentum","(","learning_rate=0.01",",","lr_decay=0.96",")",".get_tensor","(",")","``","`","Arguments",":","learning_rate",":","`","float","`",".","Learning","rate",".","momentum",":","`","float","`",".","Momentum",".","lr_decay",":","`","float","`",".","The","learning","rate","decay","to","apply",".","decay_step",":","`","int","`",".","Apply","decay","every","provided","steps",".","staircase",":","`","bool","`",".","It","`","True","`","decay","learning","rate","at","discrete","intervals",".","use_locking",":","`","bool","`",".","If","True","use","locks","for","update","operation",".","name",":","`","str","`",".","Optional","name","prefix","for","the","operations","created","when","applying","gradients",".","Defaults","to","``","Momentum","''","."]
code: def __init__(
      self,
      learning_rate=0.001,
      momentum=0.9,
      lr_decay=0.0,
      decay_step=100,
      staircase=False,
      use_locking=False,
      name="Momentum",
  ):
      super(Momentum, self).__init__(learning_rate, use_locking, name)
      self.momentum = momentum
      self.lr_decay = lr_decay
      if self.lr_decay > 0.0:
          self.has_decay = True
      self.decay_step = decay_step
      self.staircase = staircase
  
imports: from __future__ import division, print_function, absolute_import
  import tensorflow.compat.v1
  from .utils import get_from_module
label_desc: Use image node_id 1 to create a new Momentum object from inherited base classes: Optimizer with example: obj = Momentum(learning_rate, momentum, lr_decay, decay_step, staircase, use_locking, name)