From 4b18156b1400ac1f516a6b2aaa30e8a71b9c268b Mon Sep 17 00:00:00 2001 From: Taehoon Lee Date: Mon, 4 Jun 2018 17:19:26 +0900 Subject: [PATCH] Fix the bottleneck of ResNet50 reported in #5 --- keras_applications/resnet50.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keras_applications/resnet50.py b/keras_applications/resnet50.py index 2d5c994..6cfeb24 100644 --- a/keras_applications/resnet50.py +++ b/keras_applications/resnet50.py @@ -238,9 +238,8 @@ def ResNet50(include_top=True, x = identity_block(x, 3, [512, 512, 2048], stage=5, block='b') x = identity_block(x, 3, [512, 512, 2048], stage=5, block='c') - x = layers.AveragePooling2D((7, 7), name='avg_pool')(x) - if include_top: + x = layers.AveragePooling2D((7, 7), name='avg_pool')(x) x = layers.Flatten()(x) x = layers.Dense(classes, activation='softmax', name='fc1000')(x) else: