Skip to content

Commit

Permalink
Add ResNet-101 pre-trained model
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Jan 12, 2017
1 parent 7d150e8 commit 11821d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions torchvision/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'resnet18': 'https://s3.amazonaws.com/pytorch/models/resnet18-5c106cde.pth',
'resnet34': 'https://s3.amazonaws.com/pytorch/models/resnet34-333f7ec4.pth',
'resnet50': 'https://s3.amazonaws.com/pytorch/models/resnet50-19c8e357.pth',
'resnet101': 'https://s3.amazonaws.com/pytorch/models/resnet101-5d3b4d8f.pth',
}


Expand Down Expand Up @@ -171,8 +172,11 @@ def resnet50(pretrained=False):
return model


def resnet101():
return ResNet(Bottleneck, [3, 4, 23, 3])
def resnet101(pretrained=False):
model = ResNet(Bottleneck, [3, 4, 23, 3])
if pretrained:
model.load_state_dict(model_zoo.load_url(model_urls['resnet101']))
return model


def resnet152():
Expand Down

0 comments on commit 11821d6

Please sign in to comment.