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/backend/tensorflow/linalg.py:173
else:
x = tf.math.reduce_sum(
tf.linalg.svd(x, compute_uv=False), axis=-1
)
if keepdims:
x = tf.expand_dims(x, axis[0])
x = tf.expand_dims(x, axis[1])
else:
raise ValueError(
f"Invalid `ord` argument for matrix norm. Received: ord={ord}"
)
return x
else:
raise ValueError(f"Invalid axis values. Received: axis={axis}")
def qr(x, mode="reduced"):
if mode not in {"reduced", "complete"}:
raise ValueError(
"`mode` argument value not supported. "
"Expected one of {'reduced', 'complete'}. "
f"Received: mode={mode}"
)
if mode == "reduced":
return tf.linalg.qr(x)
return tf.linalg.qr(x, full_matrices=True)
def solve(a, b):
# tensorflow.linalg.solve only supports same rank inputs
if b.shape.ndims == a.shape.ndims - 1:
b = tf.expand_dims(b, axis=-1)
return tf.squeeze(tf.linalg.solve(a, b), axis=-1)
return tf.linalg.solve(a, b)
def solve_triangular(a, b, lower=False):View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/tensorflow/linalg.py:173 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/e376819294038ab9.
Report an issue: GitHub.