Skip to content

Add new weights for ResNet101 and ResNet151 #4811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions torchvision/prototype/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ class ResNet101Weights(Weights):
"acc@5": 93.546,
},
)
ImageNet1K_RefV2 = WeightEntry(
url="https://download.pytorch.org/models/resnet101-b641f3a9.pth",
transforms=partial(ImageNetEval, crop_size=224, resize_size=232),
meta={
**_common_meta,
"recipe": "https://github.com/pytorch/vision/issues/3995",
"acc@1": 81.728,
"acc@5": 95.670,
},
)


class ResNet152Weights(Weights):
Expand All @@ -127,6 +137,16 @@ class ResNet152Weights(Weights):
"acc@5": 94.046,
},
)
ImageNet1K_RefV2 = WeightEntry(
url="https://download.pytorch.org/models/resnet152-089c0848.pth",
transforms=partial(ImageNetEval, crop_size=224, resize_size=232),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resize_size was not used in the original training?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, that's a new optimization only available on the new weights. :-)

meta={
**_common_meta,
"recipe": "https://github.com/pytorch/vision/issues/3995",
"acc@1": 82.042,
"acc@5": 95.926,
},
)


class ResNeXt50_32x4dWeights(Weights):
Expand Down