code: def test_sequence_length3(self):
      data = [
          [[1], [2], [0], [0], [0]],
          [[1], [2], [3], [0], [0]],
          [[1], [2], [6], [1], [0]],
      ]
      data = tf.convert_to_tensor(data, dtype=tf.float32)
      length = tl.layers.retrieve_seq_length_op3(data)
      print(length)
      data = [
          [[1, 2], [2, 2], [1, 2], [1, 2], [0, 0]],
          [[2, 3], [2, 4], [3, 2], [0, 0], [0, 0]],
          [[3, 3], [2, 2], [5, 3], [1, 2], [0, 0]],
      ]
      data = tf.convert_to_tensor(data, dtype=tf.float32)
      length = tl.layers.retrieve_seq_length_op3(data)
      print(length)
      data = [[1, 2, 0, 0, 0], [1, 2, 3, 0, 0], [1, 2, 6, 1, 0]]
      data = tf.convert_to_tensor(data, dtype=tf.float32)
      length = tl.layers.retrieve_seq_length_op3(data)
      print(length)
      data = [
          ["hello", "world", "", "", ""],
          ["hello", "world", "tensorlayer", "", ""],
          ["hello", "world", "tensorlayer", "2.0", ""],
      ]
      data = tf.convert_to_tensor(data, dtype=tf.string)
      length = tl.layers.retrieve_seq_length_op3(data, pad_val="")
      print(length)
  
      try:
          data = [1, 2, 0, 0, 0]
          data = tf.convert_to_tensor(data, dtype=tf.float32)
          length = tl.layers.retrieve_seq_length_op3(data)
          print(length)
      except Exception as e:
          print(e)
  
      try:
          data = np.random.random([4, 2, 6, 2])
          data = tf.convert_to_tensor(data, dtype=tf.float32)
          length = tl.layers.retrieve_seq_length_op3(data)
          print(length)
      except Exception as e:
          print(e)
  
imports: import os
  import unittest
  import numpy
  import tensorflow
  import tensorlayer
  from tests.utils import CustomTestCase
label_desc: Use image node_id 26 for calling the Layer_RNN_Test obj's underlying member method code with example usage: obj.test_sequence_length3() without return types