class_docstr: Base class for seq2seq models with embeddings
    
docstr: In addition to standard gradient clipping, also clips embedding
  gradients to a specified value.
docstr_tok: ["In","addition","to","standard","gradient","clipping",",","also","clips","embedding","gradients","to","a","specified","value","."]
code: def _clip_gradients(self, grads_and_vars):
      """In addition to standard gradient clipping, also clips embedding
      gradients to a specified value."""
      grads_and_vars = super(Seq2SeqModel, self)._clip_gradients(
          grads_and_vars
      )
  
      clipped_gradients = []
      variables = []
      for gradient, variable in grads_and_vars:
          if "embedding" in variable.name:
              tmp = tf.clip_by_norm(
                  gradient.values,
                  self.params["optimizer.clip_embed_gradients"],
              )
              gradient = tf.IndexedSlices(
                  tmp, gradient.indices, gradient.dense_shape
              )
          clipped_gradients.append(gradient)
          variables.append(variable)
      return list(zip(clipped_gradients, variables))
  
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 import graph_utils
  from seq2seq import losses
  from seq2seq.contrib.seq2seq.decoder import _transpose_batch_time
  from seq2seq.data import vocab
  from seq2seq.graph_utils import templatemethod
  from seq2seq.decoders.beam_search_decoder import BeamSearchDecoder
  from seq2seq.inference import beam_search
  from seq2seq.models.model_base import ModelBase, _flatten_dict
label_desc: Use image node_id 3 for calling the Seq2SeqModel obj's underlying member method code with example usage: obj._clip_gradients(grads_and_vars) and returns: list