Skip to content
This repository was archived by the owner on Nov 3, 2022. It is now read-only.

Commit 4b18156

Browse files
committed
Fix the bottleneck of ResNet50 reported in #5
1 parent 4be176a commit 4b18156

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

keras_applications/resnet50.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,8 @@ def ResNet50(include_top=True,
238238
x = identity_block(x, 3, [512, 512, 2048], stage=5, block='b')
239239
x = identity_block(x, 3, [512, 512, 2048], stage=5, block='c')
240240

241-
x = layers.AveragePooling2D((7, 7), name='avg_pool')(x)
242-
243241
if include_top:
242+
x = layers.AveragePooling2D((7, 7), name='avg_pool')(x)
244243
x = layers.Flatten()(x)
245244
x = layers.Dense(classes, activation='softmax', name='fc1000')(x)
246245
else:

0 commit comments

Comments
 (0)