You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
Loading a VGG19 layer with include_top=False and pooling=None should return an output that is the 4D tensor of the last convolutional layer according to the docstring.
pooling: Optional pooling mode for feature extraction
when `include_top` is `False`.
- `None` means that the output of the model will be
the 4D tensor output of the
last convolutional layer.
However, we get a MaxPooling layer at the very end rather than a Conv2D layer.
Depending on what is the intended behaviour, we'll need to either change the docstring to clarify that it is the MaxPooling2D layer that is the output, or modify the VGG scripts so that the output is a Conv2D layer.
Some steps involved for the latter (more involved) fix:
Update _test_app_pooling or create a new/better test to include a check that ensures the output is indeed a convolutional layer.
Move the MaxPooling2D layer into the if include_top statement, see this codeblock section.
May also need to change the pre-trained weight files...
I can create a pull request to help out with the first two once we clarify the intended behaviour. Changing the weight files will require a bit of help.
The text was updated successfully, but these errors were encountered:
Thank you for reporting the issue, @weiji14. There is no problem in the current implementations, but the docstrings need to be revised, as you pointed out. The include_top=False, pooling=None arguments should return the last convolutional "block" rather than "layer". The "block" means generally a set of layers, and the "convolutional block" in the ImageNet models typically consists of several convolutional layers followed by (or following) a 2x down-sampling layer.
Thus, it is true that the last output in VGG(include_top=False, pooling=None) is MaxPooling2D (block5_pool). I will revise the docstrings. Thank you!
Loading a VGG19 layer with include_top=False and pooling=None should return an output that is the 4D tensor of the last convolutional layer according to the docstring.
However, we get a MaxPooling layer at the very end rather than a Conv2D layer.
I've traced it back via this git blame to this commit which was a part of farizrahman4u/keras#9
Depending on what is the intended behaviour, we'll need to either change the docstring to clarify that it is the MaxPooling2D layer that is the output, or modify the VGG scripts so that the output is a Conv2D layer.
Some steps involved for the latter (more involved) fix:
if include_top
statement, see this codeblock section.I can create a pull request to help out with the first two once we clarify the intended behaviour. Changing the weight files will require a bit of help.
The text was updated successfully, but these errors were encountered: