mirror of
https://github.com/KaiyangZhou/deep-person-reid.git
synced 2025-06-03 14:53:23 +08:00
add eval mode
This commit is contained in:
parent
e8c3f95c15
commit
cc99c36bbf
@ -108,6 +108,9 @@ class SqueezeNet(nn.Module):
|
|||||||
x10 = F.relu(self.conv10(x9))
|
x10 = F.relu(self.conv10(x9))
|
||||||
f = F.avg_pool2d(x10, x10.size()[2:]).view(x10.size(0), -1)
|
f = F.avg_pool2d(x10, x10.size()[2:]).view(x10.size(0), -1)
|
||||||
|
|
||||||
|
if not self.training:
|
||||||
|
return f
|
||||||
|
|
||||||
if self.loss == {'xent'}:
|
if self.loss == {'xent'}:
|
||||||
return f
|
return f
|
||||||
elif self.loss == {'xent', 'htri'}:
|
elif self.loss == {'xent', 'htri'}:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user