I have a doubt about the computation of the loss and accuracy for the training / validation / test.
I split my training set into batches, and I'm training my network with them for N epochs. My idea is training the network with the k-th batch and than computing the loss using the entire training set, the final loss for the current epoch is the last loss computed on the entire training set after the last batch, which is not computationally efficient. Other people sum the loss of each batch and divide by the number of batches analyzed for getting the loss of the current epoch. Is there a difference between these two methods? I think the answer is yes, but does this difference significantly impact in the loss computation?
For the accuracy some people for each batch count the number of corrected classified sample with respect to the size of the batch and keep summing these values for all the batches, but I think that this could be not accurate because during the first batches the network have different weights and they are changing during the training phase. Should the accuracy be computed on the entire training after the last analyzed batch?, where the weights are fixed and they will not change anymore for the current epoch.
For the validation and the test set instead in my opinion is correct to computing the loss and the accuracy on the entire sets (or doing the same with batches if the set is too large) as the weights are not changing in this phase.