Hi,
I have trained model A by using transfer learning (FasterRCNN -pretrained model), now I want to use model A as a pretrained model but getting issues.
step1=FasterRCNN to model A
step2= model A to model B
First I am not sure that it is a good approach or not, I am just trying it.
code sample issue
self._model=torch.load("modelA.pth",map_location=torch.device('cpu'))
in_features = self._model.roi_heads.box_predictor.cls_score.in_features
# Replace the pre-trained head with a new one (note: +1 because of the __background__ class)


Error:
in_features = self._model.roi_heads.box_predictor.cls_score.in_features
AttributeError: 'collections.OrderedDict' object has no attribute 'roi_heads'

Please let me know what I am doing wrong and how to do it.
Thanks in advance