You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Map `f` over the arguments `args` along the batch dimensions `batch_dims` and return the results with the corresponding batch dimensions specified by `result_dims`. (For users
2020
+
familiar with `jax`, this operation corresponds to `jax.vmap`.)
2021
+
2022
+
If `batch_dims` is `nothing`, we assume that the last dimension of each leaf of `args` is the batch dimension. If `result_dims` is `nothing`, we assume that the last dimension of each leaf of the returned values is the batch dimension.
2023
+
2024
+
To avoid batching a specific leaf, pass `nothing` for the corresponding `batch_dims`.
2025
+
2026
+
## Examples
2027
+
2028
+
For usage examples, see the [Batching Functions with `Reactant.Ops.batch`](@ref batching-tutorial) tutorial.
2029
+
2030
+
!!! danger
2031
+
2032
+
Mutation inside a batched function is not supported yet and will lead to unexpected results.
0 commit comments