shyamgupta196 commited on
Commit
141cd5b
1 Parent(s): 2de1e53

model input change

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -12,16 +12,16 @@ model = alexnet(pretrained=True)
12
  for param in model.parameters():
13
  param.requires_grad = False
14
 
15
- # Add a avgpool here
16
- avgpool = nn.AdaptiveAvgPool2d((7, 7))
17
-
18
- # Replace the classifier layer
19
- # to customise it according to our output
20
- model.classifier = nn.Sequential(
21
- nn.Linear(256 * 7 * 7, 1024),
22
- nn.Linear(1024, 256),
23
- nn.Linear(256, 2),
24
- )
25
 
26
  checkpoint = torch.load(
27
  "CatVsDogsModel.pth", map_location=torch.device("cpu")
 
12
  for param in model.parameters():
13
  param.requires_grad = False
14
 
15
+ # # Add a avgpool here
16
+ # avgpool = nn.AdaptiveAvgPool2d((7, 7))
17
+
18
+ # # Replace the classifier layer
19
+ # # to customise it according to our output
20
+ # model.classifier = nn.Sequential(
21
+ # nn.Linear(256 * 7 * 7, 1024),
22
+ # nn.Linear(1024, 256),
23
+ # nn.Linear(256, 2),
24
+ # )
25
 
26
  checkpoint = torch.load(
27
  "CatVsDogsModel.pth", map_location=torch.device("cpu")