Desired metric on the training set and training only on a batch

I have two questions.

  1. How do I get some metric on the training set. When I am training some model, I am getting my desired metric on the validation set. But I would like to have it with the training set too. I couldn’t find this in the documentation. Anyone knows the function I can use for this?

  2. How do I train the model only on a certain individual batch of the training set? Is there a function for this?