I tried loading my saved .h5 model and predicting with that model, i'm getting error list index out of range I saved my keras model into .h5 format. Again I've loaded that .h5 file into my colab and tried to predict with that model.
model.save(&quot;/content/drive/My Drive/Datasets/sentiment_analysis.h5&quot;)
from keras.models import load_model
loaded_model = load_model(&quot;/content/drive/MyDrive/Datasets/sentiment_analysis.h5&quot;)
loaded_model.predict(&quot;i love machine learning and google&quot;)

It's giving error list index out of range.
IndexError: list index out of range
Try these:

import everything from tensorflow keras API.
tf.keras.models.load_model(&quot;./saved_models/our_model.h5&quot;, compile=False) (make sure you have model and weights both in the file)