Created
February 22, 2020 18:27
-
-
Save yearofthewhopper/7d15053844e6267fcfa53871bc50c861 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FeatureX(nn.Module): | |
def __init__(self): | |
super(FeatureX, self).__init__() | |
vgg19_model = models.vgg19(pretrained=True) | |
self.feature_extractor = nn.Sequential(*list(vgg19_model.features.children())[:18]) | |
def forward(self, img): | |
return self.feature_extractor(img) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment