ImportError: cannot import name '_obtain_input_shape' from keras

前端 未结 5 2345
猫巷女王i
猫巷女王i 2020-12-16 10:05

In Keras,

I\'m trying to import _obtain_input_shape as follows:

from keras.applications.imagenet_utils import _obtain_input_shape
         


        
5条回答
  •  爱一瞬间的悲伤
    2020-12-16 10:49

    I have found a method that works well. You just use

    from keras_applications.imagenet_utils import _obtain_input_shape 
    

    Notice: It is keras_applications instead of keras.application.

提交回复
热议问题