Error while saving model

The training is completed successfully but it is throwing error while saving the model.

Saving best performing model...
Traceback (most recent call last):
  File "/home/", line 405, in <module>
  File "/home/", line 257, in main_function
    model, tflite_model, tflite_quant_model = ei_tensorflow.conversion.convert_to_tf_lite(
  File "/app/./resources/libraries/ei_tensorflow/", line 166, in convert_to_tf_lite
    model =, best_model_path, dir_path,
  File "/app/./resources/libraries/ei_tensorflow/", line 355, in save_model
    keras_model = load_best_model(best_model_path)
  File "/app/./resources/libraries/ei_tensorflow/", line 309, in load_best_model
    model = tf.keras.models.load_model(best_model_path, compile=False)
  File "/app/keras/.venv/lib/python3.8/site-packages/keras/utils/", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/app/keras/.venv/lib/python3.8/site-packages/keras/layers/", line 689, in build
    if shape1[axes[0]] != shape2[axes[1]]:
IndexError: list index out of range
Attached to job 3246022...

I think it was a problem with the model itself so closing this issue.

1 Like