keras-team/keras · error · ValueError
`mode` argument value not supported. Expected one of {'reduc
Error message
`mode` argument value not supported. Expected one of {'reduced', 'complete'}. Received: mode={mode} What it means
Error "`mode` argument value not supported. Expected one of {'reduced', 'complete'}. Received: mode={mode}" thrown in keras-team/keras.
Source
Thrown at keras/src/ops/linalg.py:406
Norm of the matrix or vector(s).
Example:
>>> x = keras.ops.reshape(keras.ops.arange(9, dtype="float32") - 4, (3, 3))
>>> keras.ops.linalg.norm(x)
7.7459664
"""
if any_symbolic_tensors((x,)):
return Norm(ord=ord, axis=axis, keepdims=keepdims).symbolic_call(x)
x = backend.convert_to_tensor(x)
return backend.linalg.norm(x, ord=ord, axis=axis, keepdims=keepdims)
class Qr(Operation):
def __init__(self, mode="reduced", *, name=None):
super().__init__(name=name)
if mode not in {"reduced", "complete"}:
raise ValueError(
"`mode` argument value not supported. "
"Expected one of {'reduced', 'complete'}. "
f"Received: mode={mode}"
)
self.mode = mode
def compute_output_spec(self, x):
if len(x.shape) < 2:
raise ValueError(
"Input should have rank >= 2. Received: "
f"input.shape = {x.shape}"
)
m = x.shape[-2]
n = x.shape[-1]
if m is None or n is None:
raise ValueError(
"Input should have its last 2 dimensions "
"fully-defined. Received: "View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/ops/linalg.py:406 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/ff9ca2a465773557.
Report an issue: GitHub.