Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keras import update and 'include_top' error fix #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
print('Predicted:', decode_predictions(preds))