How tensorflow understand accuracy and loss of training data?
You are still able to calculate metrics such as loss and accuracy on training data (or any data for that matter), however the important thing to keep in mind is that it is by definition training data. Therefore the metrics from the training data are not how you would expect the model to perform on new unseen data as the model has been training on these specific samples (and can possibly remember them).