Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liuning-scu-cn committed Aug 12, 2019
1 parent 08206b0 commit 449d90c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,9 @@ def forward(self, x, label=None, direction=None):
backbone_f = x.detach()
x = self.fc7(x)

# TigerID
glogit = self.cls(x)
# Left/Right
dlogit = self.cls_direction(x)

# erase
Expand All @@ -883,15 +885,19 @@ def forward(self, x, label=None, direction=None):
erase_f = x1.detach()
x1 = self.erase_fc7(x1)

# TigerID
erase_glogit = self.erase_cls(x1)
# Left/Right
erase_dlogit = self.erase_cls_direction(x1)

# fuse
fuse_f = torch.cat((backbone_f, erase_f), dim=1)
x2 = self.fuse_fc7(fuse_f)
x2 = l2_norm(x2)

# TigerID
fuse_glogit = self.fuse_cls(x2)
# Left/Right
fuse_dlogit = self.fuse_cls_direction(x2)

return [glogit, dlogit, erase_glogit, erase_dlogit, fuse_glogit, fuse_dlogit, x2]
Expand Down

0 comments on commit 449d90c

Please sign in to comment.