{"record":{"id":"2f01c1062e796df6","repo":"keras-team/keras","slug":"if-imagenet-weights-are-being-loaded-alpha-can-be-2f01c1","errorCode":null,"errorMessage":"If imagenet weights are being loaded, alpha can be one of `0.75`, `1.0` for non minimalistic or `1.0` for minimalistic only.","messagePattern":"If imagenet weights are being loaded, alpha can be one of `0\\.75`, `1\\.0` for non minimalistic or `1\\.0` for minimalistic only\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/applications/mobilenet_v3.py","lineNumber":277,"sourceCode":"    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(\n                \"`input_shape` is undefined or non-square, \"\n                \"or `rows` is not 224. \"\n                \"Weights for input shape (224, 224) will be \"\n                \"loaded as the default.\",\n                stacklevel=2,\n            )\n\n    if input_tensor is None:\n        img_input = layers.Input(shape=input_shape)\n    else:\n        if not backend.is_keras_tensor(input_tensor):","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/applications/mobilenet_v3.py#L259-L295","documentation":"Error \"If imagenet weights are being loaded, alpha can be one of `0.75`, `1.0` for non minimalistic or `1.0` for minimalistic only.\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/applications/mobilenet_v3.py:277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}