jax_reduction_function¶
- probly.representation.sample.jax_functions.jax_reduction_function(func: Callable, args: tuple[Any, ...], kwargs: dict[str, Any]) Any[source]¶
Implementation of axis-reducing jax functions with a keepdims parameter.
Unlike the torch mirror there is no
outhandling:jax.numpyreductions reject any non-Noneoutargument, so a sample array can never be an output buffer.Mirroring the numpy backend, the sample weights are never injected into
jax_average: they only apply to a reduction over the sample axis, which the caller expresses throughsample_mean()instead.