rcmalli/keras-squeezenet

Keras version compatibility: Obtain_Input_shape Error

Opened this issue · 1 comments

Tensorflow Version v1.11

Please replace this line with Tensorflow version you are using.

Keras Version v2.2.4

Please replace this line with Keras version you are using.

Keras-squeezenet Version v1.1

Please replace this line with Keras-squeezenet version you are using.

Bug reports:

cannot import name '_obtain_input_shape'
Can you suggest a workaround as I don't want to downgrade keras now

Code Sample:

I tried
from keras_applications.imagenet_utils import _obtain_input_shape

but it didn't worked too.

Tensorflow Version v1.11

Please replace this line with Tensorflow version you are using.

Keras Version v2.2.4

Please replace this line with Keras version you are using.

Keras-squeezenet Version v1.1

Please replace this line with Keras-squeezenet version you are using.

Bug reports:

cannot import name '_obtain_input_shape'
Can you suggest a workaround as I don't want to downgrade keras now

Code Sample:

I tried
from keras_applications.imagenet_utils import _obtain_input_shape

but it didn't worked too.

you don't need bother...
if you use the command 'pip install kears-squeezenet' to install, you will meet many troubles.
just use your version and copy the squeezenet.py file to import.
if your verison is keras2.2.4, then you modify the script
from 'from keras.applications.imagenet_utils import _obtain_input_shape'
to 'from keras_applications.imagenet_utils import _obtain_input_shape'.