Merge pull request #430 from sramakrishnan247/patch-1

Update mudeep.py to support testing (return features if self.training=False)
pull/462/head^2
Kaiyang 2021-04-09 13:34:50 +08:00 committed by GitHub
commit 849d08b22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -195,6 +195,9 @@ class MuDeep(nn.Module):
x = self.fc(x)
y = self.classifier(x)
if not self.training:
return x
if self.loss == 'softmax':
return y
elif self.loss == 'triplet':