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

Commit

Permalink
Update min_size as the minimum size to make the bottleneck size 1x1 (
Browse files Browse the repository at this point in the history
  • Loading branch information
taehoonlee committed Jul 28, 2018
1 parent c457429 commit 8ad3241
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion keras_applications/densenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def DenseNet(blocks,
# Determine proper input shape
input_shape = _obtain_input_shape(input_shape,
default_size=224,
min_size=221,
min_size=32,
data_format=backend.image_data_format(),
require_flatten=include_top,
weights=weights)
Expand Down
2 changes: 1 addition & 1 deletion keras_applications/inception_resnet_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def InceptionResNetV2(include_top=True,
input_shape = _obtain_input_shape(
input_shape,
default_size=299,
min_size=139,
min_size=75,
data_format=backend.image_data_format(),
require_flatten=False,
weights=weights)
Expand Down
2 changes: 1 addition & 1 deletion keras_applications/inception_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def InceptionV3(include_top=True,
input_shape = _obtain_input_shape(
input_shape,
default_size=299,
min_size=139,
min_size=75,
data_format=backend.image_data_format(),
require_flatten=False,
weights=weights)
Expand Down
5 changes: 2 additions & 3 deletions keras_applications/resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def ResNet50(include_top=True,
# Determine proper input shape
input_shape = _obtain_input_shape(input_shape,
default_size=224,
min_size=197,
min_size=32,
data_format=backend.image_data_format(),
require_flatten=include_top,
weights=weights)
Expand Down Expand Up @@ -250,8 +250,7 @@ def ResNet50(include_top=True,
x = identity_block(x, 3, [512, 512, 2048], stage=5, block='c')

if include_top:
x = layers.AveragePooling2D((7, 7), name='avg_pool')(x)
x = layers.Flatten()(x)
x = layers.GlobalAveragePooling2D(name='avg_pool')(x)
x = layers.Dense(classes, activation='softmax', name='fc1000')(x)
else:
if pooling == 'avg':
Expand Down
2 changes: 1 addition & 1 deletion keras_applications/vgg16.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def VGG16(include_top=True,
# Determine proper input shape
input_shape = _obtain_input_shape(input_shape,
default_size=224,
min_size=48,
min_size=32,
data_format=backend.image_data_format(),
require_flatten=include_top,
weights=weights)
Expand Down
2 changes: 1 addition & 1 deletion keras_applications/vgg19.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def VGG19(include_top=True,
# Determine proper input shape
input_shape = _obtain_input_shape(input_shape,
default_size=224,
min_size=48,
min_size=32,
data_format=backend.image_data_format(),
require_flatten=include_top,
weights=weights)
Expand Down

0 comments on commit 8ad3241

Please sign in to comment.