Small documentation fix (#3589)

* fixes resnet

* Fixes formatting and resnet
This commit is contained in:
Aditya Oke 2020-09-22 19:15:01 +05:30 committed by GitHub
parent 88e6b29bba
commit 96ccde9d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -54,9 +54,7 @@ Example: Imagenet (computer Vision)
def __init__(self):
# init a pretrained resnet
num_target_classes = 10
self.feature_extractor = models.resnet50(
pretrained=True,
num_classes=num_target_classes)
self.feature_extractor = models.resnet50(pretrained=True)
self.feature_extractor.eval()
# use the pretrained model to classify cifar-10 (10 image classes)