AttributeError: 'FastRCNNPredictor' object has no attribute 'conv5_mask'

when i run the official tutorial–TORCHVISION OBJECT DETECTION FINETUNING TUTORIAL, i got a error : AttributeError: ‘FastRCNNPredictor’ object has no attribute ‘conv5_mask’

It was successful on the colab but failed to run locally

you likely need to share your local code in order to debug… do you have a link to a git repo?

ok ,this is the code . i run it on win10 , pycharm.

line 91 should be mask predictor … not box predictor

look at the tutorial again

 # now get the number of input features for the mask classifier
    in_features_mask = model.roi_heads.mask_predictor.conv5_mask.in_channels
    hidden_layer = 256

ok, thank you , it works

1 Like