class_docstr: Vanilla LSTM cell.
  
  Uses ortho initializer, and also recurrent dropout without memory loss
  (https://arxiv.org/abs/1603.05118)
class_docstr_tok: ["Vanilla","LSTM","cell",".","Uses","ortho","initializer",",","and","also","recurrent","dropout","without","memory","loss","(","https",":","\/\/arxiv.org\/abs\/1603.05118",")"]
code: def __call__(self, x, state, scope=None):
      with tf.variable_scope(scope or type(self).__name__):
          c, h = tf.split(state, 2, 1)
  
          x_size = x.get_shape().as_list()[1]
  
          w_init = None  # uniform
  
          h_init = lstm_ortho_initializer(1.0)
  
          # Keep W_xh and W_hh separate here as well to use different init methods.
          w_xh = tf.get_variable(
              "W_xh", [x_size, 4 * self.num_units], initializer=w_init
          )
          w_hh = tf.get_variable(
              "W_hh",
              [self.num_units, 4 * self.num_units],
              initializer=h_init,
          )
          bias = tf.get_variable(
              "bias",
              [4 * self.num_units],
              initializer=tf.constant_initializer(0.0),
          )
  
          concat = tf.concat([x, h], 1)
          w_full = tf.concat([w_xh, w_hh], 0)
          hidden = tf.matmul(concat, w_full) + bias
  
          i, j, f, o = tf.split(hidden, 4, 1)
  
          if self.use_recurrent_dropout:
              g = tf.nn.dropout(tf.tanh(j), self.dropout_keep_prob)
          else:
              g = tf.tanh(j)
  
          new_c = (
              c * tf.sigmoid(f + self.forget_bias) + tf.sigmoid(i) * g
          )
          new_h = tf.tanh(new_c) * tf.sigmoid(o)
  
          return new_h, tf.concat([new_c, new_h], 1)
  
imports: import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the LSTMCell obj's underlying member method code with example usage: obj.__call__(x, state, scope) and returns: new_h,  tf