code: def test_basic_birnn_grucell(self):
      class CustomisedModel(tl.models.Model):
          def __init__(self):
              super(CustomisedModel, self).__init__()
              self.rnnlayer = tl.layers.BiRNN(
                  fw_cell=tf.keras.layers.GRUCell(units=8, dropout=0.1),
                  bw_cell=tf.keras.layers.GRUCell(units=8, dropout=0.1),
                  in_channels=4,
                  return_seq_2d=False,
                  return_last_state=False,
              )
              self.dense = tl.layers.Dense(in_channels=16, n_units=1)
              self.reshape = tl.layers.Reshape([-1, 6])
  
          def forward(self, x):
              z = self.rnnlayer(x, return_seq_2d=True)
              z = self.dense(z)
              z = self.reshape(z)
              return z
  
      rnn_model = CustomisedModel()
      print(rnn_model)
      optimizer = tf.optimizers.Adam(learning_rate=0.01)
      rnn_model.train()
  
      for epoch in range(50):
          with tf.GradientTape() as tape:
              pred_y = rnn_model(self.data_x)
              loss = tl.cost.mean_squared_error(pred_y, self.data_y)
  
          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 17 for calling the Layer_RNN_Test obj's underlying member method code with example usage: obj.test_basic_birnn_grucell() and returns: z