I have seen multiple feature extraction network Alexnet, ResNet. And it is quite easy to extract features from specific module for all these networks using
resnet1 = models.resnet50(pretrained=True)
modules1 = list(resnet1.children())[:-1]
But in case of Effcientnet if you use the this command. Just at difference of 1, whole model is gone
See the output of these two
eff1 = EfficientNet.from_pretrained(‘efficientnet-b0’)
modules1 = list(eff1.children())[:-6]
modules1 = nn.Sequential(*modules1)
print(modules1)
resnet1 = EfficientNet.from_pretrained(‘efficientnet-b0’)
modules1 = list(eff1.children())[0:-7]
modules1 = nn.Sequential(*modules1)
print(modules1)
The whole network of MB Blocks is gone.
Considering Table 1 in main paper EfficientNet 1
If i want to extract output of stage 5 from pretrained model and want to combine with mine separate CNN network for further classification(self.conv1, self.fc1, self.fc2,num_classes=10).
How I can use that?