class_docstr: Sequence-to-sequence dynamic model.
  
  This class implements a multi-layer recurrent neural network as encoder,
  and a multi-layer recurrent neural network decoder.
class_docstr_tok: ["Sequence-to-sequence","dynamic","model",".","This","class","implements","a","multi-layer","recurrent","neural","network","as","encoder",",","and","a","multi-layer","recurrent","neural","network","decoder","."]
docstr: Build an RNN cell that can be used by decoder.
docstr_tok: ["Build","an","RNN","cell","that","can","be","used","by","decoder","."]
code: def _build_decoder_cell(
      self,
      hparams,
      encoder_outputs,
      encoder_state,
      source_sequence_length,
      base_gpu=0,
  ):
      """Build an RNN cell that can be used by decoder."""
      # We only make use of encoder_outputs in attention-based models
      if hparams.attention:
          raise ValueError("BasicModel doesn't support attention.")
  
      cell = model_helper.create_rnn_cell(
          unit_type=hparams.unit_type,
          num_units=self.num_units,
          num_layers=self.num_decoder_layers,
          num_residual_layers=self.num_decoder_residual_layers,
          forget_bias=hparams.forget_bias,
          dropout=hparams.dropout,
          num_gpus=self.num_gpus,
          mode=self.mode,
          single_cell_fn=self.single_cell_fn,
          base_gpu=base_gpu,
      )
  
      if hparams.language_model:
          encoder_state = cell.zero_state(self.batch_size, self.dtype)
      elif not hparams.pass_hidden_state:
          raise ValueError(
              "For non-attentional model, "
              "pass_hidden_state needs to be set to True"
          )
  
      # For beam search, we need to replicate encoder infos beam_width times
      if (
          self.mode == tf.contrib.learn.ModeKeys.INFER
          and hparams.infer_mode == "beam_search"
      ):
          decoder_initial_state = tf.contrib.seq2seq.tile_batch(
              encoder_state, multiplier=hparams.beam_width
          )
      else:
          decoder_initial_state = encoder_state
  
      return cell, decoder_initial_state
  
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 4 for calling the Model obj's underlying member method code with example usage: obj._build_decoder_cell(hparams, encoder_outputs, encoder_state, source_sequence_length, base_gpu) and returns: cell,  decoder_initial_state