Hi!
Thanks for your reply! So this is basically the same as doing the following right:
train_losses += loss.item() * images.size(0)
train_loss = train_losses/len(reader.train)

With  images.size(0) corresponding to the batch_size.