PyTorch Evaluation function with Mask R-CNN does not work

Hi, I’m facing a problem with the evaluation method.
I’m following the tutorial available in PyTorch for finetuning a Mask-RCNN model with my own dataset (TorchVision Object Detection Finetuning Tutorial — PyTorch Tutorials 1.8.1+cu102 documentation).
The training does not have any problem but when the evaluation process starts it gets stuck. There are no errors, nothing that can suggest the reason for the one this is not working.
As code, I have used the one available in the PyTorch Github repository, also used in the tutorial mentioned above (vision/engine.py at dc42f933f3343c76727dbfba6e4242f1bcb8e1a0 · pytorch/vision · GitHub), the evaluation function one. I modified it by removing the CPU’s use and using only the GPU, a Tesla T4. Any suggestion on how to fix the problem or which could be the reason for this behaviour? Considering that there are no bottlenecks that could interfere with the model’s behaviour by following the GPU usage.