{"record":{"id":"282eed5d543c7fea","repo":"keras-team/keras","slug":"input-tensor-input-tensor-is-type-type-input-t","errorCode":null,"errorMessage":"input_tensor: {input_tensor}is type: {type(input_tensor)}which is not a valid type","messagePattern":"input_tensor: (.+?)is type: (.+?)which is not a valid type","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/applications/mobilenet_v3.py","lineNumber":235,"sourceCode":"                        \"input_shape[1] must equal \"\n                        \"input_tensor.shape[2].  Received \"\n                        f\"input_shape={input_shape}, \"\n                        \"input_tensor.shape=\"\n                        f\"{input_tensor.shape}\"\n                    )\n        else:\n            raise ValueError(\n                \"input_tensor specified: \",\n                input_tensor,\n                \"is not a keras tensor\",\n            )\n\n    # If input_shape is None, infer shape from input_tensor\n    if input_shape is None and input_tensor is not None:\n        try:\n            backend.is_keras_tensor(input_tensor)\n        except ValueError:\n            raise ValueError(\n                \"input_tensor: \",\n                input_tensor,\n                \"is type: \",\n                type(input_tensor),\n                \"which is not a valid type\",\n            )\n\n        if backend.is_keras_tensor(input_tensor):\n            if backend.image_data_format() == \"channels_first\":\n                rows = input_tensor.shape[2]\n                cols = input_tensor.shape[3]\n                input_shape = (3, cols, rows)\n            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:","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/applications/mobilenet_v3.py#L217-L253","documentation":"Error \"input_tensor: {input_tensor}is type: {type(input_tensor)}which is not a valid type\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/applications/mobilenet_v3.py:235 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"}