Hello everyone, I’m following the object detection tutorial you’ll find here 22.
However I want to use in backbone a vgg11/Resnet18 instead of the MobileNet v2 of the tutorial.
For the VGG11 I replace :
backbone = torchvision.models.mobilenet_v2(pretrained=True).features
backbone.out_channels = 1280

by:
backbone = torchvision.models.vgg11_bn(pretrained=True, progress=True).features
backbone.out_channels = 512

For the ResNet18:
resnet18 = torchvision.models.resnet18(pretrained=True)
backbone = torch.nn.Sequential(nn.Sequential(*list(resnet18.children())[:-2]))
backbone.out_channels = 512

I have the same error for both backbones:

image969×518 26.4 KB


image892×264 13.9 KB

If you have an explanation, I’m interested .
Torch : 1.5.0
Torchvision : 0.6.0
Thank you.