Skip to content

Commit

Permalink
Add resnet num_classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanbocao committed Jul 10, 2022
1 parent 4aded52 commit 5217d90
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,24 @@ def forward(self, x):
return out


def ResNet18():
return ResNet(BasicBlock, [2, 2, 2, 2])
def ResNet18(num_classes=10):
return ResNet(BasicBlock, [2, 2, 2, 2], num_classes)


def ResNet34():
return ResNet(BasicBlock, [3, 4, 6, 3])
def ResNet34(num_classes=10):
return ResNet(BasicBlock, [3, 4, 6, 3], num_classes)


def ResNet50():
return ResNet(Bottleneck, [3, 4, 6, 3])
def ResNet50(num_classes=10):
return ResNet(Bottleneck, [3, 4, 6, 3], num_classes)


def ResNet101():
return ResNet(Bottleneck, [3, 4, 23, 3])
def ResNet101(num_classes=10):
return ResNet(Bottleneck, [3, 4, 23, 3], num_classes)


def ResNet152():
return ResNet(Bottleneck, [3, 8, 36, 3])
def ResNet152(num_classes=10):
return ResNet(Bottleneck, [3, 8, 36, 3], num_classes)


def test():
Expand Down

0 comments on commit 5217d90

Please sign in to comment.