keras-team/keras · error · ValueError
Input size must be at least 32x32; Received `input_shape={in
Error message
Input size must be at least 32x32; Received `input_shape={input_shape}` What it means
Error "Input size must be at least 32x32; Received `input_shape={input_shape}`" thrown in keras-team/keras.
Source
Thrown at keras/src/applications/mobilenet_v3.py:266
else:
rows = input_tensor.shape[1]
cols = input_tensor.shape[2]
input_shape = (cols, rows, 3)
# If input_shape is None and input_tensor is None using standard shape
if input_shape is None and input_tensor is None:
if backend.image_data_format() == "channels_last":
input_shape = (None, None, 3)
else:
input_shape = (3, None, None)
if backend.image_data_format() == "channels_last":
row_axis, col_axis = (0, 1)
else:
row_axis, col_axis = (1, 2)
rows = input_shape[row_axis]
cols = input_shape[col_axis]
if rows and cols and (rows < 32 or cols < 32):
raise ValueError(
"Input size must be at least 32x32; Received `input_shape="
f"{input_shape}`"
)
if weights == "imagenet":
if (
not minimalistic
and alpha not in [0.75, 1.0]
or minimalistic
and alpha != 1.0
):
raise ValueError(
"If imagenet weights are being loaded, "
"alpha can be one of `0.75`, `1.0` for non minimalistic "
"or `1.0` for minimalistic only."
)
if rows != cols or rows != 224:
warnings.warn(View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/applications/mobilenet_v3.py:266 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/e3bb6f1a281bb74c.
Report an issue: GitHub.