Loading weights to predict on train set

Hi, I am quite new to PyTorch lightning.

After every training epoch, I would like to make a prediction on the training dataset and save the prediction results. Are there any ways how I could implement this within the LightningModule?

Most of the documents call the lightningmodule framework outside of the trainer and makes a prediction. My point is to know if there is a way to do so inside the LightningModule

Thanks in advance!