code: def test_modellayer(self):
      data = np.random.normal(
          size=[self.batch_size, self.inputs_shape[1]]
      ).astype(np.float32)
  
      origin_results_train = self.model(data, is_train=True)
      origin_results_test = self.model(data, is_train=False)
  
      new_innet = Input(self.inputs_shape)
      new_mlayer = ModelLayer(self.model)(new_innet)
  
      newmodel = Model(inputs=new_innet, outputs=new_mlayer)
  
      new_results_train = newmodel(data, is_train=True)
      new_results_test = newmodel(data, is_train=False)
  
      self.assertEqual(
          origin_results_train.shape, new_results_train.shape
      )
      self.assertTrue(
          np.array_equal(
              origin_results_test.shape, new_results_test.shape
          )
      )
  
      newmodel.release_memory()
  
file_path: TensorLayer/tests/layers/test_layers_core_basedense_dropout.py
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 6 for calling the Layer_Core_Test obj's underlying member method code with example usage: obj.test_modellayer() without return types