diff --git a/resnet50.py b/resnet50.py index 8b1235e..f6a11d4 100644 --- a/resnet50.py +++ b/resnet50.py @@ -28,7 +28,7 @@ from keras.utils.data_utils import get_file from keras.applications.imagenet_utils import decode_predictions from keras.applications.imagenet_utils import preprocess_input -from keras.applications.imagenet_utils import _obtain_input_shape +from keras_applications.imagenet_utils import _obtain_input_shape from keras.engine.topology import get_source_inputs @@ -177,7 +177,7 @@ def ResNet50(include_top=True, weights='imagenet', default_size=224, min_size=197, data_format=K.image_data_format(), - include_top=include_top) + require_flatten=include_top) if input_tensor is None: img_input = Input(shape=input_shape) @@ -283,4 +283,4 @@ def ResNet50(include_top=True, weights='imagenet', print('Input image shape:', x.shape) preds = model.predict(x) - print('Predicted:', decode_predictions(preds)) \ No newline at end of file + print('Predicted:', decode_predictions(preds))