I am getting the same error… on a different tensor Having trouble migrating to torchvision FasterRCNN 16  without any mask data added yet.
seems the masks are NOT optional and perhaps I need to re-add it to my dataset and loader ?