docstr: The results of LSTMCell and LayerNormBasicLSTMCell should be the same.
docstr_tok: ["The","results","of","LSTMCell","and","LayerNormBasicLSTMCell","should","be","the","same","."]
code: def testBasicLSTMCellWithStateTupleLayerNorm(self):
      """The results of LSTMCell and LayerNormBasicLSTMCell should be the same."""
      with self.cached_session() as sess:
          with tf.variable_scope(
              "root", initializer=tf.constant_initializer(0.5)
          ):
              x = tf.zeros([1, 2])
              c0 = tf.zeros([1, 2])
              h0 = tf.zeros([1, 2])
              state0 = rnn_cell.LSTMStateTuple(c0, h0)
              c1 = tf.zeros([1, 2])
              h1 = tf.zeros([1, 2])
              state1 = rnn_cell.LSTMStateTuple(c1, h1)
              cell = rnn_cell.MultiRNNCell(
                  [
                      contrib_rnn.LayerNormBasicLSTMCell(
                          2,
                          layer_norm=True,
                          norm_gain=1.0,
                          norm_shift=0.0,
                      )
                      for _ in range(2)
                  ]
              )
              h, (s0, s1) = cell(x, (state0, state1))
              sess.run([tf.global_variables_initializer()])
              res = sess.run(
                  [h, s0, s1],
                  {
                      x.name: np.array([[1.0, 1.0]]),
                      c0.name: 0.1 * np.asarray([[0, 1]]),
                      h0.name: 0.1 * np.asarray([[2, 3]]),
                      c1.name: 0.1 * np.asarray([[4, 5]]),
                      h1.name: 0.1 * np.asarray([[6, 7]]),
                  },
              )
  
              expected_h = np.array([[-0.38079708, 0.38079708]])
              expected_h0 = np.array([[-0.38079708, 0.38079708]])
              expected_c0 = np.array([[-1.0, 1.0]])
              expected_h1 = np.array([[-0.38079708, 0.38079708]])
              expected_c1 = np.array([[-1.0, 1.0]])
  
              self.assertEqual(len(res), 3)
              self.assertAllClose(res[0], expected_h, 1e-5)
              self.assertAllClose(res[1].c, expected_c0, 1e-5)
              self.assertAllClose(res[1].h, expected_h0, 1e-5)
              self.assertAllClose(res[2].c, expected_c1, 1e-5)
              self.assertAllClose(res[2].h, expected_h1, 1e-5)
  
imports: import itertools
  from absl.testing import parameterized
  from magenta.contrib import rnn
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the LayerNormBasicLSTMCellTest obj's underlying member method code with example usage: obj.testBasicLSTMCellWithStateTupleLayerNorm() without return types