class_docstr: This is an adaptor for RNNCell classes to be used with `FusedRNNCell`.
class_docstr_tok: ["This","is","an","adaptor","for","RNNCell","classes","to","be","used","with","`","FusedRNNCell","`","."]
code: def __call__(
      self,
      inputs,
      initial_state=None,
      dtype=None,
      sequence_length=None,
      scope=None,
  ):
      is_list = isinstance(inputs, list)
      if self._use_dynamic_rnn:
          if is_list:
              inputs = array_ops.stack(inputs)
          outputs, state = rnn.dynamic_rnn(
              self._cell,
              inputs,
              sequence_length=sequence_length,
              initial_state=initial_state,
              dtype=dtype,
              time_major=True,
              scope=scope,
          )
          if is_list:
              # Convert outputs back to list
              outputs = array_ops.unstack(outputs)
      else:  # non-dynamic rnn
          if not is_list:
              inputs = array_ops.unstack(inputs)
          outputs, state = rnn.static_rnn(
              self._cell,
              inputs,
              initial_state=initial_state,
              dtype=dtype,
              sequence_length=sequence_length,
              scope=scope,
          )
          if not is_list:
              # Convert outputs back to tensor
              outputs = array_ops.stack(outputs)
  
      return outputs, state
  
file_path: spark-nlp/python/sparknlp/training/_tf_graph_builders/tf2contrib/fused_rnn_cell.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import six
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import rnn
label_desc: Use image node_id 2 for calling the FusedRNNCellAdaptor obj's underlying member method code with example usage: obj.__call__(inputs, initial_state, dtype, sequence_length, scope) and returns: outputs,  state