Skip to content

Commit

Permalink
Update docstring example for resnet_fpn_backbone
Browse files Browse the repository at this point in the history
Add missing imports and use fix deprecated use of `backbone_name' as positional parameter.
  • Loading branch information
kit1980 authored Sep 11, 2023
1 parent 0b41ff0 commit 9381d8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion torchvision/models/detection/backbone_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ def resnet_fpn_backbone(
Examples::
>>> import torch
>>> from torchvision.models import ResNet50_Weights
>>> from torchvision.models.detection.backbone_utils import resnet_fpn_backbone
>>> backbone = resnet_fpn_backbone('resnet50', weights=ResNet50_Weights.DEFAULT, trainable_layers=3)
>>> backbone = resnet_fpn_backbone(backbone_name='resnet50', weights=ResNet50_Weights.DEFAULT, trainable_layers=3)
>>> # get some dummy image
>>> x = torch.rand(1,3,64,64)
>>> # compute the output
Expand Down

0 comments on commit 9381d8b

Please sign in to comment.