Solved by ptrblck in post #6 
              
              
                The average of the batch losses will give you an estimate of the “epoch loss” during training. 
Since you are calculating the loss anyway, you could just sum it and calculate the mean after the epoch finishes. 
This training loss is used to see, how well your model performs on the training dataset. 
…