I don’t quite understand your use case.
You usually don’t see the batch dimension as it’s used in the computations in the module.
So usually you won’t find any for loops over the batch dim. Could you post an example of what you are trying to achieve?