From 95318fe30599cc92c9520c7eca46f352ace056d4 Mon Sep 17 00:00:00 2001 From: Mriganka Nath Date: Wed, 5 Jan 2022 21:16:05 +0530 Subject: [PATCH] updated the example for fasterrcnn_resnet50 --- torchvision/models/detection/faster_rcnn.py | 1 + 1 file changed, 1 insertion(+) diff --git a/torchvision/models/detection/faster_rcnn.py b/torchvision/models/detection/faster_rcnn.py index 1b4213ba04e..8f2a96e2be1 100644 --- a/torchvision/models/detection/faster_rcnn.py +++ b/torchvision/models/detection/faster_rcnn.py @@ -356,6 +356,7 @@ def fasterrcnn_resnet50_fpn( >>> model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True) >>> # For training >>> images, boxes = torch.rand(4, 3, 600, 1200), torch.rand(4, 11, 4) + >>> boxes[:, :, 2:4] = boxes[:, :, 0:2] + boxes[:, :, 2:4] >>> labels = torch.randint(1, 91, (4, 11)) >>> images = list(image for image in images) >>> targets = []