The architectures of NASNetMobile and NASNetLarge differ depending on whether input_shape is even or odd, while the architectures of the other networks are independent to input_shape.
Thus, there are issues (keras-team/keras#10109, keras-team/keras#12013) when using NASNetLarge(weights='imagenet', include_top=False). This is because input_shape becomes (None, None, 3) when include_top=False. The None shape makes the proposed NASNet architecture different.
This PR sets the default shape for NASNet when include_top=False as (224, 224, 3) or (331, 331, 3) by changing require_flatten.
The architectures of
NASNetMobile
andNASNetLarge
differ depending on whetherinput_shape
is even or odd, while the architectures of the other networks are independent toinput_shape
.Thus, there are issues (keras-team/keras#10109, keras-team/keras#12013) when using
NASNetLarge(weights='imagenet', include_top=False)
. This is becauseinput_shape
becomes(None, None, 3)
wheninclude_top=False
. TheNone
shape makes the proposed NASNet architecture different.This PR sets the default shape for NASNet when
include_top=False
as(224, 224, 3)
or(331, 331, 3)
by changingrequire_flatten
.