ACoL icon indicating copy to clipboard operation
ACoL copied to clipboard

About vgg_v1.py

Open koalaofpoint opened this issue 5 years ago • 1 comments

Sir,I'm refer your reseach to my work.I read your paper I found the earse means set the value=0; I need to know how to earse the feature,but the vgg1.py file I cann't understand.So I see maybe you can provide something for me,thank you

koalaofpoint avatar May 22 '19 07:05 koalaofpoint

The feature maps to be erased are from the activation function ReLU, whose range is [0, +inf). Therefore, the actual erasing operation is to set the pixel values of object regions identified by Classifier A to zeros.

We erase the feature maps according to the right localization maps from classifier A in this line: https://github.com/xiaomengyc/ACoL/blob/master/models/vgg/vgg_v1.py#L74.

Briefly, we construct a binary map, where pixels to be erased are 0, others are 1. Then, we multiply this map with the feature maps element-wisely. The piexls w.r.t the 0 positions are considered as erased.

xiaomengyc avatar May 23 '19 04:05 xiaomengyc