No, data.size(0) would return the same value as len(data):
data = torch.randn(6, 4)
print(data.size(0))
> 6
print(len(data))
> 6

Since you are scaling the loss via:
running_loss += current_batch_loss * nb_samples_in_batch

you would have to divide by the number of samples in the entire dataset (len(loader.dataset)).