Skip to content

Commit ee15527

Browse files
authored
Update nasnet_mobile.py
Remove softmax from logits
1 parent f2ede77 commit ee15527

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pretrainedmodels/models/nasnet_mobile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ def logits(self, features):
607607
x = x.view(x.size(0), -1)
608608
x = self.dropout(x)
609609
x = self.last_linear(x)
610-
x = nn.Softmax(1)(x)
611610
return x
612611

613612
def forward(self, input):
@@ -659,4 +658,4 @@ def nasnetamobile(num_classes=1001, pretrained='imagenet'):
659658
input = Variable(torch.randn(2, 3, 224, 224))
660659
output = model(input)
661660

662-
print(output.size())
661+
print(output.size())

0 commit comments

Comments
 (0)