ptrblck:

Usually you print the average loss per sample. To do this, you could divide total_loss by len(train_set) .


Thanks a lot @ptrblck, I never realized about this detail! Can I ask you a couple questions more related questions:


how is softmax activation function already implicit in the cross-entropy loss function?


Why in order to compute the total loss I am multiplying loss.item() * batch_size?