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: