{"record":{"id":"ff9ca2a465773557","repo":"keras-team/keras","slug":"mode-argument-value-not-supported-expected-one-ff9ca2","errorCode":null,"errorMessage":"`mode` argument value not supported. Expected one of {'reduced', 'complete'}. Received: mode={mode}","messagePattern":"`mode` argument value not supported\\. Expected one of (.+?)\\. Received: mode=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/ops/linalg.py","lineNumber":406,"sourceCode":"        Norm of the matrix or vector(s).\n\n    Example:\n\n    >>> x = keras.ops.reshape(keras.ops.arange(9, dtype=\"float32\") - 4, (3, 3))\n    >>> keras.ops.linalg.norm(x)\n    7.7459664\n    \"\"\"\n    if any_symbolic_tensors((x,)):\n        return Norm(ord=ord, axis=axis, keepdims=keepdims).symbolic_call(x)\n    x = backend.convert_to_tensor(x)\n    return backend.linalg.norm(x, ord=ord, axis=axis, keepdims=keepdims)\n\n\nclass Qr(Operation):\n    def __init__(self, mode=\"reduced\", *, name=None):\n        super().__init__(name=name)\n        if mode not in {\"reduced\", \"complete\"}:\n            raise ValueError(\n                \"`mode` argument value not supported. \"\n                \"Expected one of {'reduced', 'complete'}. \"\n                f\"Received: mode={mode}\"\n            )\n        self.mode = mode\n\n    def compute_output_spec(self, x):\n        if len(x.shape) < 2:\n            raise ValueError(\n                \"Input should have rank >= 2. Received: \"\n                f\"input.shape = {x.shape}\"\n            )\n        m = x.shape[-2]\n        n = x.shape[-1]\n        if m is None or n is None:\n            raise ValueError(\n                \"Input should have its last 2 dimensions \"\n                \"fully-defined. Received: \"","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/ops/linalg.py#L388-L424","documentation":"Error \"`mode` argument value not supported. Expected one of {'reduced', 'complete'}. Received: mode={mode}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/ops/linalg.py:406 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"}