TransWikia.com

How to find which patch in orignal image does an activation correspond to in vgg net after the final pooling layer

Data Science Asked by AYUSH MANGAL on March 15, 2021

So I am working on the NeurIPS 2019 reproducibility challenge, The link to the paper is https://arxiv.org/abs/1806.10574. So basically we have a vgg-16 net with the final fully-connected layers removed, so we get the 7x7x512 dimensional activation maps, Now the paper introduces a novel prototype layer in which we compare these 7×7 activation maps with 1x1x512 dimensional prototypes using the L2 norm, and wherever the prototype has the maximum similarity after considering all the input images we equate the prototype to that 1x1x512 patch in the activation maps

Now all is good and fine, but the paper further wants to find the patch in the original image corresponding to the 1×1 patch, so we can say that the prototype is effectively somewhat that patch in the original image.

Now what I found out is that the 224×224 to 7×7 transition can be effectively done by 212×212 kernel with 32 strides (using the effective local receptive field) image explaining this (Not mine, copied the image from somewhere)

Okay so now if I get a 1×1 activation which I need to find the original image patch of ..its quite easy…but the problem is that in VGG net we apply zero-padding of 1 many time, so effectively we are getting a padding of 90(calculated using input size of 224, kernel size of 212 and stride of 32) in the original image , so suppose I get the top-left 1×1 activation as the one I want to find the patch of, then it will have a lot of portion = 0 due to the heavy effective padding in the original image, So is this okay ?

Sorry for the extremely long question, but it’s a conceptual one and needed a deep explanation

One Answer

Tracing activation through a neural net is complex. OpenAI Microscope helps visualize it.

Answered by Brian Spiering on March 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP