4040
4141
4242class FasterRCNN_ResNet50_FPN_Weights (WeightsEnum ):
43- Coco_V1 = Weights (
43+ COCO_V1 = Weights (
4444 url = "https://download.pytorch.org/models/fasterrcnn_resnet50_fpn_coco-258fb6c6.pth" ,
4545 transforms = CocoEval ,
4646 meta = {
@@ -50,11 +50,11 @@ class FasterRCNN_ResNet50_FPN_Weights(WeightsEnum):
5050 "map" : 37.0 ,
5151 },
5252 )
53- default = Coco_V1
53+ default = COCO_V1
5454
5555
5656class FasterRCNN_MobileNet_V3_Large_FPN_Weights (WeightsEnum ):
57- Coco_V1 = Weights (
57+ COCO_V1 = Weights (
5858 url = "https://download.pytorch.org/models/fasterrcnn_mobilenet_v3_large_fpn-fb6a3cc7.pth" ,
5959 transforms = CocoEval ,
6060 meta = {
@@ -64,11 +64,11 @@ class FasterRCNN_MobileNet_V3_Large_FPN_Weights(WeightsEnum):
6464 "map" : 32.8 ,
6565 },
6666 )
67- default = Coco_V1
67+ default = COCO_V1
6868
6969
7070class FasterRCNN_MobileNet_V3_Large_320_FPN_Weights (WeightsEnum ):
71- Coco_V1 = Weights (
71+ COCO_V1 = Weights (
7272 url = "https://download.pytorch.org/models/fasterrcnn_mobilenet_v3_large_320_fpn-907ea3f9.pth" ,
7373 transforms = CocoEval ,
7474 meta = {
@@ -78,11 +78,11 @@ class FasterRCNN_MobileNet_V3_Large_320_FPN_Weights(WeightsEnum):
7878 "map" : 22.8 ,
7979 },
8080 )
81- default = Coco_V1
81+ default = COCO_V1
8282
8383
8484@handle_legacy_interface (
85- weights = ("pretrained" , FasterRCNN_ResNet50_FPN_Weights .Coco_V1 ),
85+ weights = ("pretrained" , FasterRCNN_ResNet50_FPN_Weights .COCO_V1 ),
8686 weights_backbone = ("pretrained_backbone" , ResNet50_Weights .ImageNet1K_V1 ),
8787)
8888def fasterrcnn_resnet50_fpn (
@@ -113,7 +113,7 @@ def fasterrcnn_resnet50_fpn(
113113
114114 if weights is not None :
115115 model .load_state_dict (weights .get_state_dict (progress = progress ))
116- if weights == FasterRCNN_ResNet50_FPN_Weights .Coco_V1 :
116+ if weights == FasterRCNN_ResNet50_FPN_Weights .COCO_V1 :
117117 overwrite_eps (model , 0.0 )
118118
119119 return model
@@ -161,7 +161,7 @@ def _fasterrcnn_mobilenet_v3_large_fpn(
161161
162162
163163@handle_legacy_interface (
164- weights = ("pretrained" , FasterRCNN_MobileNet_V3_Large_FPN_Weights .Coco_V1 ),
164+ weights = ("pretrained" , FasterRCNN_MobileNet_V3_Large_FPN_Weights .COCO_V1 ),
165165 weights_backbone = ("pretrained_backbone" , MobileNet_V3_Large_Weights .ImageNet1K_V1 ),
166166)
167167def fasterrcnn_mobilenet_v3_large_fpn (
@@ -192,7 +192,7 @@ def fasterrcnn_mobilenet_v3_large_fpn(
192192
193193
194194@handle_legacy_interface (
195- weights = ("pretrained" , FasterRCNN_MobileNet_V3_Large_320_FPN_Weights .Coco_V1 ),
195+ weights = ("pretrained" , FasterRCNN_MobileNet_V3_Large_320_FPN_Weights .COCO_V1 ),
196196 weights_backbone = ("pretrained_backbone" , MobileNet_V3_Large_Weights .ImageNet1K_V1 ),
197197)
198198def fasterrcnn_mobilenet_v3_large_320_fpn (
0 commit comments