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/train.py", line 405, in <module>
    main_function()
  File "/home/train.py", line 257, in main_function
    model, tflite_model, tflite_quant_model = ei_tensorflow.conversion.convert_to_tf_lite(
  File "/app/./resources/libraries/ei_tensorflow/conversion.py", line 166, in convert_to_tf_lite
    model = ei_tensorflow.training.save_model(model, best_model_path, dir_path,
  File "/app/./resources/libraries/ei_tensorflow/training.py", line 355, in save_model
    keras_model = load_best_model(best_model_path)
  File "/app/./resources/libraries/ei_tensorflow/training.py", 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/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/app/keras/.venv/lib/python3.8/site-packages/keras/layers/merge.py", 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