AttributeError: module 'tensorflow' has no attribute 'get_default_graph'

前端 未结 5 715
一生所求
一生所求 2021-01-05 11:26

I am doing some task related to image captioning and I have loaded the weights of inception model like this

model = InceptionV3(weights=\'imagenet\')
         


        
5条回答
  •  半阙折子戏
    2021-01-05 11:35

    In my case, replacing

    from keras.models import models

    with:

    from tensorflow.keras.models import models

    in my script, fixed this problem.

提交回复
热议问题