diff --git a/README.md b/README.md index 585230d..cb37280 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/util/model.py b/util/model.py index 8316080..3620d3f 100644 --- a/util/model.py +++ b/util/model.py @@ -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)