Created
August 6, 2020 21:52
-
-
Save thunderInfy/6bed54cac3e64ef70faff17743bfdc3a 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
| # defining our deep learning architecture | |
| resnetq = resnet18(pretrained=False) | |
| classifier = nn.Sequential(OrderedDict([ | |
| ('fc1', nn.Linear(resnetq.fc.in_features, 100)), | |
| ('added_relu1', nn.ReLU(inplace=True)), | |
| ('fc2', nn.Linear(100, 50)), | |
| ('added_relu2', nn.ReLU(inplace=True)), | |
| ('fc3', nn.Linear(50, 25)) | |
| ])) | |
| resnetq.fc = classifier | |
| resnetk = copy.deepcopy(resnetq) | |
| # moving the resnet architecture to device | |
| resnetq.to(device) | |
| resnetk.to(device) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment