docstr: Test case for parameter sharing of create_parameter op
docstr_tok: ["Test","case","for","parameter","sharing","of","create_parameter","op"]
code: def test_param_sharing_with_create_parameter(self):
      """
      Test case for parameter sharing of create_parameter op
      """
      net = MyNetWork()
  
      main_program1 = fluid.Program()
      with fluid.program_guard(main_program1):
          x = layers.data(name="x", shape=[100], dtype="float32")
          out1 = x + net.created_param()
  
      main_program2 = fluid.Program()
      with fluid.program_guard(main_program2):
          x = layers.data(name="x", shape=[100], dtype="float32")
          out2 = x + net.created_param()
  
      place = fluid.CPUPlace()
      exe = fluid.Executor(place)
      exe.run(fluid.default_startup_program())
  
      input_np = np.random.uniform(0, 1, [1, 100]).astype("float32")
      out1_np = exe.run(
          main_program1, feed={"x": input_np}, fetch_list=[out1]
      )[0]
      out2_np = exe.run(
          main_program2, feed={"x": input_np}, fetch_list=[out2]
      )[0]
      self.assertEqual(
          np.sum(out1_np.flatten()), np.sum(out2_np.flatten())
      )
  
file_path: PARL/parl/core/fluid/layers/tests/param_sharing_test_fluid.py
imports: import numpy
  import paddle.fluid
  import parl
  import unittest
  from parl import layers
label_desc: Use image node_id 2 for calling the TestParamSharing obj's underlying member method code with example usage: obj.test_param_sharing_with_create_parameter() without return types