Skip to content

Commit a7746ef

Browse files
authored
Add regnet_y_128gf from SWAG (#5732)
* Add regnet_y_128gh_swag weight * Add default weight for regnet_y_128gf * Add the accuracy from experiments
1 parent 3130b45 commit a7746ef

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

torchvision/models/regnet.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,19 @@ class RegNet_Y_32GF_Weights(WeightsEnum):
629629

630630

631631
class RegNet_Y_128GF_Weights(WeightsEnum):
632-
# weights are not available yet.
633-
pass
632+
IMAGENET1K_SWAG_V1 = Weights(
633+
url="https://download.pytorch.org/models/regnet_y_128gf_swag-c8ce3e52.pth",
634+
transforms=partial(
635+
ImageClassification, crop_size=384, resize_size=384, interpolation=InterpolationMode.BICUBIC
636+
),
637+
meta={
638+
**_COMMON_SWAG_META,
639+
"num_params": 644812894,
640+
"acc@1": 88.228,
641+
"acc@5": 98.682,
642+
},
643+
)
644+
DEFAULT = IMAGENET1K_SWAG_V1
634645

635646

636647
class RegNet_X_400MF_Weights(WeightsEnum):

0 commit comments

Comments
 (0)