{"record":{"id":"a15960cb10bbab82","repo":"keras-team/keras","slug":"unsupported-reduction-reduction","errorCode":null,"errorMessage":"Unsupported reduction: {reduction}","messagePattern":"Unsupported reduction: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/jax/core.py","lineNumber":596,"sourceCode":"\n\ndef scatter_update(inputs, indices, updates, reduction=None):\n    inputs = convert_to_tensor(inputs)\n    indices = jnp.array(indices)\n    indices = jnp.transpose(indices)\n    idx = tuple(indices)\n    if reduction is None:\n        return inputs.at[idx].set(updates)\n    elif reduction == \"add\":\n        return inputs.at[idx].add(updates)\n    elif reduction == \"max\":\n        return inputs.at[idx].max(updates)\n    elif reduction == \"min\":\n        return inputs.at[idx].min(updates)\n    elif reduction == \"mul\":\n        return inputs.at[idx].multiply(updates)\n    else:\n        raise ValueError(f\"Unsupported reduction: {reduction}\")\n\n\ndef slice(inputs, start_indices, shape):\n    # If shape[i] is -1, all remaining elements in dimension i are included in\n    # the slice.\n    final_shape = tuple(\n        inputs.shape[i] - start_indices[i] if s == -1 else s\n        for i, s in enumerate(shape)\n    )\n    return jax.lax.dynamic_slice(inputs, start_indices, final_shape)\n\n\ndef slice_update(inputs, start_indices, updates):\n    return jax.lax.dynamic_update_slice(inputs, updates, start_indices)\n\n\ndef switch(index, branches, *operands):\n    return jax.lax.switch(index, branches, *operands)","sourceCodeStart":578,"sourceCodeEnd":614,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/jax/core.py#L578-L614","documentation":"Error \"Unsupported reduction: {reduction}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/jax/core.py:596 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"}