RetinaNet (from torchvision) fine tuning

Hi all, I want to fine-tune retinanet from torchvision using the pipeline from, but a couple of issues happening. For the model, I am altering the pretrained model with the following code for one object class:

model = torchvision.models.detection.retinanet_resnet50_fpn(pretrained=True)
model.head=RetinaNetHead(in_channels, num_anchors, 2)

The issue is the evaluation gives absolute zero on every metric and loss shows nan randomly for the same data.

1 Like