I am doing some task related to image captioning and I have loaded the weights of inception model like this
model = InceptionV3(weights=\'imagenet\')
In my case, replacing
from keras.models import models
with:
from tensorflow.keras.models import models
in my script, fixed this problem.