{"record":{"id":"91e6e40843b73e64","repo":"keras-team/keras","slug":"if-include-top-is-true-you-should-specify-a-sta","errorCode":null,"errorMessage":"If `include_top` is True, you should specify a static `input_shape`. Received: input_shape={input_shape}","messagePattern":"If `include_top` is True, you should specify a static `input_shape`\\. Received: input_shape=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/applications/imagenet_utils.py","lineNumber":408,"sourceCode":"                if (\n                    input_shape[0] is not None and input_shape[0] < min_size\n                ) or (input_shape[1] is not None and input_shape[1] < min_size):\n                    raise ValueError(\n                        \"Input size must be at least \"\n                        f\"{min_size}x{min_size}; Received: \"\n                        f\"input_shape={input_shape}\"\n                    )\n    else:\n        if require_flatten:\n            input_shape = default_shape\n        else:\n            if data_format == \"channels_first\":\n                input_shape = (3, None, None)\n            else:\n                input_shape = (None, None, 3)\n    if require_flatten:\n        if None in input_shape:\n            raise ValueError(\n                \"If `include_top` is True, \"\n                \"you should specify a static `input_shape`. \"\n                f\"Received: input_shape={input_shape}\"\n            )\n    return input_shape\n\n\ndef correct_pad(inputs, kernel_size):\n    \"\"\"Returns a tuple for zero-padding for 2D convolution with downsampling.\n\n    Args:\n      inputs: Input tensor.\n      kernel_size: An integer or tuple/list of 2 integers.\n\n    Returns:\n      A tuple.\n    \"\"\"\n    img_dim = 2 if backend.image_data_format() == \"channels_first\" else 1","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/applications/imagenet_utils.py#L390-L426","documentation":"Error \"If `include_top` is True, you should specify a static `input_shape`. Received: input_shape={input_shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/applications/imagenet_utils.py:408 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"}