The operations process the whole batch.
Usually you don’t even to add a batch dimension, if you use a Dataset and DataLoader.
While creating your Dataset you just have to define, how one sample is loaded.
The DataLoader automatically stacks these samples to a batch with dimensions [batch_size, ...].
Have a look at the Data loading tutorial for more information.