{"record":{"id":"e3bb6f1a281bb74c","repo":"keras-team/keras","slug":"input-size-must-be-at-least-32x32-received-input","errorCode":null,"errorMessage":"Input size must be at least 32x32; Received `input_shape={input_shape}`","messagePattern":"Input size must be at least 32x32; Received `input_shape=(.+?)`","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/applications/mobilenet_v3.py","lineNumber":266,"sourceCode":"            else:\n                rows = input_tensor.shape[1]\n                cols = input_tensor.shape[2]\n                input_shape = (cols, rows, 3)\n    # If input_shape is None and input_tensor is None using standard shape\n    if input_shape is None and input_tensor is None:\n        if backend.image_data_format() == \"channels_last\":\n            input_shape = (None, None, 3)\n        else:\n            input_shape = (3, None, None)\n\n    if backend.image_data_format() == \"channels_last\":\n        row_axis, col_axis = (0, 1)\n    else:\n        row_axis, col_axis = (1, 2)\n    rows = input_shape[row_axis]\n    cols = input_shape[col_axis]\n    if rows and cols and (rows < 32 or cols < 32):\n        raise ValueError(\n            \"Input size must be at least 32x32; Received `input_shape=\"\n            f\"{input_shape}`\"\n        )\n    if weights == \"imagenet\":\n        if (\n            not minimalistic\n            and alpha not in [0.75, 1.0]\n            or minimalistic\n            and alpha != 1.0\n        ):\n            raise ValueError(\n                \"If imagenet weights are being loaded, \"\n                \"alpha can be one of `0.75`, `1.0` for non minimalistic \"\n                \"or `1.0` for minimalistic only.\"\n            )\n\n        if rows != cols or rows != 224:\n            warnings.warn(","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/applications/mobilenet_v3.py#L248-L284","documentation":"MobileNetV3 builder in keras/src/applications/mobilenet_v3.py: after resolving input_shape (from arguments or input_tensor), any spatial dimension below 32 is rejected, because the MobileNetV3 stem and downsampling stages require at least 32x32 pixels to produce usable feature maps.","triggerScenarios":"Thrown at keras/src/applications/mobilenet_v3.py:266 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resize images to at least 32x32 (ideally the 224x224 default) before inference/training","Update input_shape (or the input tensor's shape) to meet the 32x32 minimum","Choose a lighter model variant instead of shrinking inputs below the limit"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}