Hi all, I want to fine-tune retinanet from torchvision using the pipeline from https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html, 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)
num_anchors=model.head.classification_head.num_anchors
in_channels=model.head.classification_head.conv[0].in_channels
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.
Ah cool, thank you for your reply.
So from your experience, working with ADAM was ok and the solution could be trying different learning rates. Also, thank you for your suggestion. I’ll try and see how to implement a grid search.