Skip to content

Commit 75046bd

Browse files
authored
Update docstring example for resnet_fpn_backbone (#7957)
1 parent 0b41ff0 commit 75046bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchvision/models/detection/backbone_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ def resnet_fpn_backbone(
7979
8080
Examples::
8181
82+
>>> import torch
83+
>>> from torchvision.models import ResNet50_Weights
8284
>>> from torchvision.models.detection.backbone_utils import resnet_fpn_backbone
83-
>>> backbone = resnet_fpn_backbone('resnet50', weights=ResNet50_Weights.DEFAULT, trainable_layers=3)
85+
>>> backbone = resnet_fpn_backbone(backbone_name='resnet50', weights=ResNet50_Weights.DEFAULT, trainable_layers=3)
8486
>>> # get some dummy image
8587
>>> x = torch.rand(1,3,64,64)
8688
>>> # compute the output

0 commit comments

Comments
 (0)