Based on the error message it seems torch.load('modelA.pth') loads a state_dict (which is an OrderedDict).
If that’s the case (which is also the recommended way of loading a model), you would have to create the model object first and then load the state_dict as seen here:
model = FasterRCNN()
state_dict = torch.load('modelA.pth', map_location='cpu')
model.load_state_dict(state_dict)
in_features = model.roi_heads...