keras-team/keras · error · ValueError
Unsupported reduction: {reduction}
Error message
Unsupported reduction: {reduction} What it means
Error "Unsupported reduction: {reduction}" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/jax/ops/core.py:592
def scatter_update(inputs, indices, updates, reduction=None):
inputs = convert_to_tensor(inputs)
indices = jnp.array(indices)
indices = jnp.transpose(indices)
idx = tuple(indices)
if reduction is None:
return inputs.at[idx].set(updates)
elif reduction == "add":
return inputs.at[idx].add(updates)
elif reduction == "max":
return inputs.at[idx].max(updates)
elif reduction == "min":
return inputs.at[idx].min(updates)
elif reduction == "mul":
return inputs.at[idx].multiply(updates)
else:
raise ValueError(f"Unsupported reduction: {reduction}")
def slice(inputs, start_indices, shape):
# If shape[i] is -1, all remaining elements in dimension i are included in
# the slice.
final_shape = tuple(
inputs.shape[i] - start_indices[i] if s == -1 else s
for i, s in enumerate(shape)
)
return jax.lax.dynamic_slice(inputs, start_indices, final_shape)
def slice_update(inputs, start_indices, updates):
return jax.lax.dynamic_update_slice(inputs, updates, start_indices)
def switch(index, branches, *operands):
return jax.lax.switch(index, branches, *operands)View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/jax/ops/core.py:592 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/a1b6fe186a76a3a4.
Report an issue: GitHub.