code: def test_model_quantize_onnx(self):
      model = EfficientNetB0(
          weights=None, input_shape=[224, 224, 3], classes=10
      )
      model = Model(inputs=model.inputs, outputs=model.outputs)
      input_examples = np.random.random((100, 224, 224, 3)).astype(
          np.float32
      )
      input_features = np.random.randint(0, 10, size=100)
  
      train_dataset = tf.data.Dataset.from_tensor_slices(
          (input_examples, input_features)
      )
  
      # quantize a Keras model
      onnx_quantized_model = InferenceOptimizer.quantize(
          model,
          accelerator="onnxruntime",
          x=train_dataset,
          thread_num=8,
          accuracy_criterion={
              "relative": 0.99,
              "higher_is_better": True,
          },
      )
  
      y_hat = onnx_quantized_model(input_examples[:10])
      assert y_hat.shape == (10, 10)
  
      y_hat = onnx_quantized_model.predict(input_examples, batch_size=5)
      assert y_hat.shape == (100, 10)
  
      preds = model.predict(input_examples, batch_size=5)
      onnx_preds = onnx_quantized_model.predict(
          input_examples, batch_size=5
      )
      np.testing.assert_allclose(preds, onnx_preds, rtol=5e-2)
  
file_path: BigDL/python/nano/test/onnx/tf/test_inc_onnx.py
imports: from unittest import TestCase
  import tempfile
  import tensorflow
  from tensorflow.keras.applications import EfficientNetB0
  import numpy
  from bigdl.nano.tf.keras import Model, InferenceOptimizer
  from bigdl.nano.deps.onnxruntime.tensorflow.model import KerasONNXRuntimeModel
label_desc: Use image node_id 1 for calling the TestONNX obj's underlying member method code with example usage: obj.test_model_quantize_onnx() without return types