are you working with a specific model tutorial or example?
Hard to answer without knowing more details but if you’re using the example pytorch tutorial I believe the evaluation function uses a inference (predictions) step then takes your inference and runs it by some COCO evaluation metrics…
I have my best attempt at splitting up the two from one another in this post

  
    
    
    Object detection tutorial with COCODataset giving empty mask predictions vision
  
  
    I whittled down a simpler example of the original example and got a (I think) proper score function… only to realize the T.toTensor function does some strange things… and I need to rewrite this for inference… correct?  don’t I need to transform all images to a tensor or ? 
so far I have this 
@torch.no_grad()
def score(paths_to_images):
    # train on the GPU or on the CPU, if a GPU is not available
    device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')

    num_…