I am doing some task related to image captioning and I have loaded the weights of inception model like this
model = InceptionV3(weights=\'imagenet\')
Another cause due to which this is happening is that in tensorflow_backend.py
located in : lib/python3.6/site-packages/keras/backend/
uses tf.compat.v1.get_default_graph for obtaining graph
instead of tf.get_default_graph.
By replacing this in the directory this problem can be solved successfully.