This PR removes a contradict exception in MobileNet and MobileNetV2. They are already able to take input_shape=None, include_top=False. In other words, inferences for arbitrary input shapes are possible as follows.
import numpy as np
from keras.applications.mobilenet_v2 import MobileNetV2
x = np.random.random((1, 224, 448, 3)).astype(np.float32)
mobilenet1 = MobileNetV2(input_shape=None, include_top=False)
print(mobilenet1.predict(x).shape) # (1, 7, 14, 1280)
But currently, it is impossible to even create a model with the below form.
This PR removes a contradict exception in MobileNet and MobileNetV2. They are already able to take
input_shape=None, include_top=False
. In other words, inferences for arbitrary input shapes are possible as follows.But currently, it is impossible to even create a model with the below form.
This PR enables users to create a model with a non-square static input shape.