class_docstr: Sequence-to-sequence base class.
class_docstr_tok: ["Sequence-to-sequence","base","class","."]
docstr: Maximum decoding steps at inference time.
docstr_tok: ["Maximum","decoding","steps","at","inference","time","."]
code: def _get_infer_maximum_iterations(
      self, hparams, source_sequence_length
  ):
      """Maximum decoding steps at inference time."""
      if hparams.tgt_max_len_infer:
          maximum_iterations = hparams.tgt_max_len_infer
          utils.print_out(
              "  decoding maximum_iterations %d" % maximum_iterations
          )
      else:
          # TODO(thangluong): add decoding_length_factor flag
          decoding_length_factor = 2.0
          max_encoder_length = tf.reduce_max(source_sequence_length)
          maximum_iterations = tf.to_int32(
              tf.round(
                  tf.to_float(max_encoder_length)
                  * decoding_length_factor
              )
          )
      return maximum_iterations
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import collections
  import tensorflow
  from tensorflow.contrib.model_pruning import get_masks, get_thresholds
  from tensorflow.contrib.model_pruning.python import pruning
  from tensorflow.contrib.model_pruning.python.layers import core_layers
  from .None import model_helper
  from .utils import misc_utils, iterator_utils
label_desc: Use image node_id 14 for calling the BaseModel obj's underlying member method code with example usage: obj._get_infer_maximum_iterations(hparams, source_sequence_length) and returns: maximum_iterations