Merge pull request #430 from sramakrishnan247/patch-1
Update mudeep.py to support testing (return features if self.training=False)pull/462/head^2
commit
849d08b22b
|
@ -194,7 +194,10 @@ class MuDeep(nn.Module):
|
|||
x = x.view(x.size(0), -1)
|
||||
x = self.fc(x)
|
||||
y = self.classifier(x)
|
||||
|
||||
|
||||
if not self.training:
|
||||
return x
|
||||
|
||||
if self.loss == 'softmax':
|
||||
return y
|
||||
elif self.loss == 'triplet':
|
||||
|
|
Loading…
Reference in New Issue