How can I delete the fc7 layer in Faster RCNN?
And the following is part of the model structure
(roi_heads): RoIHeads(
    (box_roi_pool): MultiScaleRoIAlign()
    (box_head): TwoMLPHead(
      (fc6): Linear(in_features=12544, out_features=1024, bias=True)
      (fc7): Linear(in_features=1024, out_features=1024, bias=True)
    )
    (box_predictor): FastRCNNPredictor(
      (cls_score): Linear(in_features=1024, out_features=91, bias=True)
      (bbox_pred): Linear(in_features=1024, out_features=364, bias=True)
    )
  )

And if I do:
model.roi_heads.box_head=model.roi_heads.box_head.fc6

The model size will becoe super huge. When I put model in cuda, the CUDA memory will go from 7GB to 15GB  immediately.
What’s the issue here?