code: def test_basic_birnn_lstmcell(self):
      inputs = tl.layers.Input(
          [self.batch_size, self.num_steps, self.embedding_size]
      )
      rnnlayer = tl.layers.BiRNN(
          fw_cell=tf.keras.layers.LSTMCell(
              units=self.hidden_size, dropout=0.1
          ),
          bw_cell=tf.keras.layers.LSTMCell(
              units=self.hidden_size + 1, dropout=0.1
          ),
          return_seq_2d=False,
          return_last_state=True,
      )
      rnn, rnn_fw_state, rnn_bw_state = rnnlayer(inputs)
      din = tl.layers.Reshape(
          [-1, self.hidden_size + self.hidden_size + 1]
      )(rnn)
      dense = tl.layers.Dense(n_units=1)(din)
      outputs = tl.layers.Reshape([-1, self.num_steps])(dense)
      rnn_model = tl.models.Model(
          inputs=inputs,
          outputs=[outputs, rnn, rnn_fw_state[0], rnn_bw_state[0]],
      )
      print(rnn_model)
  
      optimizer = tf.optimizers.Adam(learning_rate=0.01)
  
      rnn_model.train()
      assert rnnlayer.is_train
  
      for epoch in range(50):
          with tf.GradientTape() as tape:
              pred_y, r, rfw, rbw = rnn_model(self.data_x)
              loss = tl.cost.mean_squared_error(pred_y, self.data_y2)
  
          self.assertEqual(
              r.get_shape().as_list(),
              [
                  self.batch_size,
                  self.num_steps,
                  self.hidden_size + self.hidden_size + 1,
              ],
          )
          gradients = tape.gradient(loss, rnn_model.trainable_weights)
          optimizer.apply_gradients(
              zip(gradients, rnn_model.trainable_weights)
          )
  
          if (epoch + 1) % 10 == 0:
              print("epoch %d, loss %f" % (epoch, loss))
  
imports: import os
  import unittest
  import numpy
  import tensorflow
  import tensorlayer
  from tests.utils import CustomTestCase
label_desc: Use image node_id 16 for calling the Layer_RNN_Test obj's underlying member method code with example usage: obj.test_basic_birnn_lstmcell() without return types