Closed ebursztein closed 5 years ago
If you refer to the Keras Applications module, all model builders use pooling=False
. This argument is used only when the include_top
argument is False.
If it is false, the user has 3 choices, get the raw outputs of the final layer without spatial pooling, or chose between max or avg spatial pooling. They are dictated by None
, max
and avg
for the pooling argument respectively. https://github.com/keras-team/keras-applications/blob/master/keras_applications/nasnet.py#L71
By default, since pooling is not specified, it will not add any pooling layer at the end at all.
Agree seems fine. Read the code too quickly. sorry for the bother. Closing
No worries. Glad issue is resolved.
pooling=None
in line 218 should bepooling='avg'
so that when including top the correct pooling layers is added or the maxpool in anelif
and have the else do nothing so it is up to the user to add its merging layers.As it is by default
x = layers.GlobalMaxPooling2D()(x)
is included whenuse_top=False
which is not what you want given that the default for the network isGlobalAveragePooling2D