class_docstr: Abstract base class for models.
  
  Args:
    params: A dictionary of hyperparameter values
    name: A name for this model to be used as a variable scope
class_docstr_tok: ["Abstract","base","class","for","models",".","Args",":","params",":","A","dictionary","of","hyperparameter","values","name",":","A","name","for","this","model","to","be","used","as","a","variable","scope"]
docstr: Creates the training operation
docstr_tok: ["Creates","the","training","operation"]
code: def _build_train_op(self, loss):
      """Creates the training operation"""
      learning_rate_decay_fn = (
          training_utils.create_learning_rate_decay_fn(
              decay_type=self.params["optimizer.lr_decay_type"] or None,
              decay_steps=self.params["optimizer.lr_decay_steps"],
              decay_rate=self.params["optimizer.lr_decay_rate"],
              start_decay_at=self.params["optimizer.lr_start_decay_at"],
              stop_decay_at=self.params["optimizer.lr_stop_decay_at"],
              min_learning_rate=self.params[
                  "optimizer.lr_min_learning_rate"
              ],
              staircase=self.params["optimizer.lr_staircase"],
          )
      )
  
      optimizer = self._create_optimizer()
      train_op = tf.contrib.layers.optimize_loss(
          loss=loss,
          global_step=tf.contrib.framework.get_global_step(),
          learning_rate=self.params["optimizer.learning_rate"],
          learning_rate_decay_fn=learning_rate_decay_fn,
          clip_gradients=self._clip_gradients,
          optimizer=optimizer,
          summaries=[
              "learning_rate",
              "loss",
              "gradients",
              "gradient_norm",
          ],
      )
  
      return train_op
  
file_path: seq2seq/seq2seq/models/model_base.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import collections
  import tensorflow
  from seq2seq.configurable import Configurable
  from seq2seq.training import utils
  from seq2seq import global_vars
label_desc: Use image node_id 4 for calling the ModelBase obj's underlying member method code with example usage: obj._build_train_op(loss) and returns: train_op