PyRetri / PyRetri

Open source deep learning based unsupervised image retrieval toolbox built on PyTorch🔥

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use GAP and GMP simultaneously?

HymEric opened this issue · comments

How to use GAP and GMP simultaneously or use other more than one aggregators for extracting?

Furthermore, if I want to use [N, C, W, H] (by GAP to become [N, L1]) feature and [N, L2] feature to concatenate as [N, L1+L1] what can I do? Now, this operation has errors:
image

What is the 'output' in your feature names?
Pyretri will automatically concatenate multiple features in the L dimension.

You must convert the feature of shape [N, C, W, H] into [N,C] by an aggregator before saving it to json file. When reloading from json file, different features of 2 dimensions will be concatenated together.