February 2018
Intermediate to advanced
262 pages
6h 59m
English
Let's create all the three required models, as shown in the following code:
#Create ResNet modelmy_resnet = resnet34(pretrained=True)if is_cuda: my_resnet = my_resnet.cuda()my_resnet = nn.Sequential(*list(my_resnet.children())[:-1])for p in my_resnet.parameters(): p.requires_grad = False#Create inception modelmy_inception = inception_v3(pretrained=True)my_inception.aux_logits = Falseif is_cuda: my_inception = my_inception.cuda()for p in my_inception.parameters(): p.requires_grad = False#Create densenet modelmy_densenet = densenet121(pretrained=True).featuresif is_cuda: my_densenet = my_densenet.cuda() for p in my_densenet.parameters(): p.requires_grad = False
Now we have all the models, let's extract the features from the ...
Read now
Unlock full access