TypeError: _obtain_input_shape() got an unexpected keyword argument 'include_top'
alyato opened this issue · comments
@adamcasson when i call the resnet152, it show that
base_model = ResNet152(classes=8)
change line 262 - 266 to:
input_shape = _obtain_input_shape(input_shape,
default_size=img_size,
min_size=197,
data_format=K.image_data_format(),
require_flatten=False)
Fixed it for me at least
Using TensorFlow backend.
Traceback (most recent call last):
File "", line 4, in
from resnet152 import ResNet152
File "resnet152.py", line 37, in
from keras.applications.imagenet_utils import _obtain_input_shape
ImportError: cannot import name _obtain_input_shape
what @ChristofHenkel said didn't fix the issue for me
switching from keras 2.2.2 to 2.0.0 didn't solve the issue for me
the initial code in this repo with tensorflow 2.0.0 works though. It is better to consider a downgrade on this case
Merged PR from @edumucelli should fix