Created
October 13, 2021 13:40
-
-
Save CLozy/1054f3c30f171430006edd5aff289e53 to your computer and use it in GitHub Desktop.
classifier
This file contains 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
for param in model.parameters(): | |
param.requires_grad = False | |
from collections import OrderedDict | |
classifier = nn.Sequential(OrderedDict([ | |
('fc1', nn.Linear(25088, 4096)), | |
('relu1', nn.ReLU()), | |
('drop1', nn.Dropout(p=0.5)), | |
('fc2', nn.Linear(4096, 4096)), | |
('relu2', nn.ReLU()), | |
('drop2', nn.Dropout(p=0.5)), | |
('fc3', nn.Linear(4096, 1000)), | |
('relu3', nn.ReLU()), | |
('drop3', nn.Dropout(p=0.5)), | |
('fc4', nn.Linear(1000,2)), | |
])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment