Thank you for your reply @emcp !
I am using something like that: Object Detection with Faster RCNN | by Arun Prakash | Francium Tech 3
This is the training part from the tutorial:

image1050×867 164 KB

My problem is that the model returns either the loss or the predictions so I want to find a way to get both for evaluation without iterating over my entire data twice every epoch (it takes me 24 minutes for one iteration over train set- 16,000 images with batch_size=32)
I am not familiar with an evaluation function in pytorch tutorial. I would appreciate if you can direct me to it if it is relevant for what I want
Thank you!