Is there a way to know how many epoch or steps the model has trained with Trainer API?

For instance, I want to add a new loss after 5 epochs’ training.

All the relevant information is kept in the Trainer state

2 Likes

Thank you!