pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
15.92k stars 6.9k forks source link

Pyramid layer #1737

Open MitraTj opened 4 years ago

MitraTj commented 4 years ago

I want to extract the third layer of feature pyramid from

features = self.backbone(images.tensors) in generalized_rcnn.py

any help please?

fmassa commented 4 years ago

Can't you just do something like

features = model.backbone(images.tensors)
feat = features[2]

?

MitraTj commented 4 years ago

Yes, but the problem is the error happens for this line: detections, detector_losses = self.roi_heads(feat, proposals, images.image_sizes, targets)