sitzikbs/netVLAD

Can u post a simple test file?

Jucjiaswiss opened this issue · 4 comments

I am using Keras+VGG and I intend to replace the pooling layer with your function, but it seems there are no place to put. Can u help me?

Not sure I understand the question. It is designed to work as an independent function. simply netVLAD.VLAD_pooling() with the inputs and it should work. Not sure about Keras integration but it outputs a tensor so there shouldn't be a problem.

Thank you for replying! I should put it another way.
Here's my intention:
I am using keras-vgg16(souce code below), now I intend to replace one pooling layer with the VLAD_pooling( ) function, but the inputs don't match (used in vgg16 and the ones for VLAD_pooling( )).
image
So it just confused me since I am a beginner. Or I can just make the inputs from what I have with vgg16.

Besides, Can you explain more about the argument 'scope' ? maybe an example?

I can not fully understand what is wrong.
if it doesn't work, the first thing I would check is an input dimension problem. your input should be of size BxHxWxC (B for batch size, H,W for image height and width and C for the number of channels).
For a full explanation of scope please refer to the TensorFlow documentation. In short, it is the unique name of layers (and their variables).