class_docstr: This class allows to extend optimizers with the lookahead mechanism.
  
  The mechanism is proposed by Michael R. Zhang et.al in the paper
  [Lookahead Optimizer: k steps forward, 1 step back]
  (https://arxiv.org/abs/1907.08610v1). The optimizer iteratively updates two
  sets of weights: the search directions for weights are chosen by the inner
  optimizer, while the "slow weights" are updated each `k` steps based on the
  directions of the "fast weights" and the two sets of weights are
  synchronized. This method improves the learning stability and lowers the
  variance of its inner optimizer.
  
  Example of usage:
  
  ```python
  opt = tf.keras.optimizers.SGD(learning_rate)
  opt = tfa.optimizers.Lookahead(opt)
  ```
class_docstr_tok: ["This","class","allows","to","extend","optimizers","with","the","lookahead","mechanism",".","The","mechanism","is","proposed","by","Michael","R.","Zhang","et.al","in","the","paper","[","Lookahead","Optimizer",":","k","steps","forward",",","1","step","back","]","(","https",":","\/\/arxiv.org\/abs\/1907.08610v1",")",".","The","optimizer","iteratively","updates","two","sets","of","weights",":","the","search","directions","for","weights","are","chosen","by","the","inner","optimizer",",","while","the","``","slow","weights","''","are","updated","each","`","k","`","steps","based","on","the","directions","of","the","``","fast","weights","''","and","the","two","sets","of","weights","are","synchronized",".","This","method","improves","the","learning","stability","and","lowers","the","variance","of","its","inner","optimizer",".","Example","of","usage",":","``","`","python","opt","=","tf.keras.optimizers.SGD","(","learning_rate",")","opt","=","tfa.optimizers.Lookahead","(","opt",")","``","`"]
code: def learning_rate(self, learning_rate):
      self._optimizer._set_hyper("learning_rate", learning_rate)
  
imports: import tensorflow
  from tensorflow_addons.utils import types
  from tensorflow_addons.optimizers import KerasLegacyOptimizer
  from typeguard import typechecked
label_desc: Use image node_id 12 for calling the Lookahead obj's underlying member method code with example usage: obj.learning_rate(learning_rate) without return types