jax.lax.reduce#
- jax.lax.reduce(operands, init_values, computation, dimensions)[source]#
Wraps XLA’s Reduce operator.
init_valuesandcomputationtogether must form a monoid for correctness. That isinit_valuesmust be an identity ofcomputation, andcomputationmust be associative. XLA may exploit both of these properties during code generation; if either is violated the result is undefined.- Parameters:
operands (Any)
init_values (Any)
computation (Callable[[Any, Any], Any])
dimensions (Sequence[int])
- Return type:
Any