code: def __kmodel_load_def_weight_test(self, kmodel, input_data):
      keras_model_path_json, keras_model_path_hdf5 = dump_keras(
          kmodel, dump_weights=True
      )
      bmodel = DefinitionLoader.from_json_path(keras_model_path_json)
      WeightLoader.load_weights_from_hdf5(
          bmodel, kmodel, keras_model_path_hdf5
      )
      bmodel.training(False)
      boutput = bmodel.forward(input_data)
      koutput = kmodel.predict(input_data)
      assert_allclose(boutput, koutput, rtol=1e-5)
  
imports: from __future__ import print_function
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  import bigdl.dllib.nn.layer
  from bigdl.dllib.keras.converter import WeightLoader
  from bigdl.dllib.keras.converter import DefinitionLoader
  from test.bigdl.test_utils import BigDLTestCase, TestModels
  from bigdl.dllib.nn.keras.keras_utils import *
  import keras.backend
label_desc: Use image node_id 1 for calling the TestLoadModel obj's underlying member method code with example usage: obj.__kmodel_load_def_weight_test(kmodel, input_data) without return types