The idea is to have an extra dimension.
In particular, if you use a TensorDataset, you want to change your Tensor from real_size, ... to real_size / batch_size, batch_size, ... and as for batch 1 from the Dataloader. That way you will get one batch of size batch_size every time. Note that you get an input of size 1, batch_size, ... that you might want to reshape to remove the leading 1.