This commit is contained in:
CaoGang2018 2020-05-31 17:54:13 +08:00
parent 0e28ffcf8d
commit 4dcc749d98
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@ On CUB and split dataset in `CUB_200.py`.
random split CUB-200-2011 results:
||top1|top5
---|:--:|---:
CUB|0.46|0.71
CUB|0.546|0.794

View File

@ -38,8 +38,10 @@ class pool_model(nn.Module):
# print(tmp1.shape)
# print(tmp2.shape)
return t.cat((tmp1, tmp2.reshape(b, c)), dim=1).reshape(b, -1)
x = t.cat((tmp1, tmp2.reshape(b, c)), dim=1).reshape(b, -1)
x = nn.functional.normalize(x, p=2, dim=1)
return x
# x = t.ones(2, 512, 7, 7)
# model = pool_model()
# print(model(x).shape)