Hello guys
I am trying to change the RESNET50 backbone of Faster RCNN by MobileNET.
My code seems like:

from torchvision.models.detection import FasterRCNN
backbone = torchvision.models.mobilenet_v2(pretrained=True)
backbone.out_channels = 1280
model = FasterRCNN(backbone)

But i get this error

ValueError: num_classes should not be None when box_predictor is not specified

I am starting with this kind of networks, so there are many things that i am still learning, any help would be great.
The objective that i have is to compare the time inference of resnet 50+faster (default) vs mobilenet+faster, so i dont want either train or fine tuning the network