docstr: Compare forward results for Keras model against Zoo Keras API model.
docstr_tok: ["Compare","forward","results","for","Keras","model","against","Zoo","Keras","API","model","."]
code: def compare_model(
      self, zmodel, kmodel, input_data, rtol=1e-5, atol=1e-5
  ):
      """
      Compare forward results for Keras model against Zoo Keras API model.
      """
      from bigdl.dllib.keras.converter import WeightLoader
  
      WeightLoader.load_weights_from_kmodel(zmodel, kmodel)
      zmodel.training(is_training=False)
      bigdl_output = zmodel.forward(input_data)
      keras_output = kmodel.predict(input_data)
      self.assert_allclose(
          bigdl_output, keras_output, rtol=rtol, atol=atol
      )
  
imports: from __future__ import print_function
  import logging
  import shutil
  from unittest import TestCase
  import keras.backend
  from bigdl.dllib.nncontext import *
  from bigdl.dllib.feature.image import ImageSet
label_desc: Use image node_id 8 for calling the ZooTestCase obj's underlying member method code with example usage: obj.compare_model(zmodel, kmodel, input_data, rtol, atol) without return types