code: def test_lambda_layer_keras_model(self):
      input_shape = [100, 5]
      in_2 = tl.layers.Input(input_shape, name="input")
      layers = [
          tf.keras.layers.Dense(10, activation=tf.nn.relu),
          tf.keras.layers.Dense(5, activation=tf.nn.sigmoid),
          tf.keras.layers.Dense(1, activation=tf.nn.relu),
      ]
      perceptron = tf.keras.Sequential(layers)
      # in order to compile keras model and get trainable_variables of the keras model
      _ = perceptron(np.random.random(input_shape).astype(np.float32))
      plambdalayer = tl.layers.Lambda(
          perceptron, perceptron.trainable_variables
      )(in_2)
      M2 = tl.models.Model(inputs=in_2, outputs=plambdalayer)
  
      M2.save("M2_keras.hdf5")
      M4 = Model.load("M2_keras.hdf5")
  
      M2.eval()
      M4.eval()
      npInput = np.zeros(input_shape) + 3
      output2 = M2(npInput).numpy()
      output4 = M4(npInput).numpy()
  
      M2_config = RemoveDateInConfig(M2.config)
      M4_config = RemoveDateInConfig(M4.config)
  
      self.assertEqual((output2 == output4).all(), True)
      self.assertEqual(M2_config, M4_config)
  
      ori_weights = M4.all_weights
      ori_val = ori_weights[1].numpy()
      modify_val = np.zeros_like(ori_val) + 10
      M4.all_weights[1].assign(modify_val)
      M4 = Model.load("M2_keras.hdf5")
  
      self.assertLess(
          np.max(np.abs(ori_val - M4.all_weights[1].numpy())), 1e-7
      )
  
imports: import os
  import unittest
  import numpy
  import tensorflow
  import tensorlayer
  from tensorlayer.layers import *
  from tensorlayer.models import *
  from tests.utils import CustomTestCase
label_desc: Use image node_id 4 for calling the Lambda_layer_test obj's underlying member method code with example usage: obj.test_lambda_layer_keras_model() without return types