docstr: Test for ZooModel save and load.
  The loaded model should have the same class as the original model.
  The loaded model should produce the same forward and backward results as the original model.
docstr_tok: ["Test","for","ZooModel","save","and","load",".","The","loaded","model","should","have","the","same","class","as","the","original","model",".","The","loaded","model","should","produce","the","same","forward","and","backward","results","as","the","original","model","."]
code: def assert_zoo_model_save_load(
      self, model, input_data, rtol=1e-6, atol=1e-6
  ):
      """
      Test for ZooModel save and load.
      The loaded model should have the same class as the original model.
      The loaded model should produce the same forward and backward results as the original model.
      """
      model_class = model.__class__
      tmp_path = create_tmp_path() + ".bigdl"
      model.save_model(tmp_path, over_write=True)
      loaded_model = model_class.load_model(tmp_path)
      assert isinstance(loaded_model, model_class)
      self.compare_output_and_grad_input(
          model, loaded_model, input_data, rtol, atol
      )
      os.remove(tmp_path)
  
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 10 for calling the ZooTestCase obj's underlying member method code with example usage: obj.assert_zoo_model_save_load(model, input_data, rtol, atol) without return types