ekingedik / loupe-pytorch

Learnable mOdUle for Pooling fEatures(LOUPE) implementation in pytorch and it's example use
17 stars 5 forks source link

NetVLAD #1

Closed lsl1229840757 closed 2 years ago

lsl1229840757 commented 3 years ago

when I use NetVLAD, I find that this model get reshaped_input in this way:

reshaped_input = input.view(-1, self.feature_size)

but image is channel first in pytorch, like the screenshot below, although the above operation can get the same shape tensor, this tensor is wrong

image

ekingedik commented 2 years ago

Hello,

As stated in the source code, you need to reshape your input into 'batch_size' x 'max_samples' x 'feature_size' format before feeding it into NetVLAD layers. The specific implementation in this repo does not focus on image data.

Best, Ekin