myungsub / CAIN

Source code for AAAI 2020 paper "Channel Attention Is All You Need for Video Frame Interpolation"
MIT License
326 stars 43 forks source link

Feature map attention score #18

Closed issakh closed 2 years ago

issakh commented 2 years ago

Hi, thanks for your work, it is pretty interesting. I have a question about the feature maps in figure 5. I know to obtain the feature maps you'd use hooks, but how do you manage to obtain the attention scores for the feature maps? Thanks again

myungsub commented 2 years ago

When I was drawing Figure 5, I temporarily changed the code of the channel attention layer (CALayer)to also output the attention scores. (You can see in some leftover unused code regarding the self.return_ca option)

repers commented 2 years ago

As the tensor returned is multi-channel, how do you find the high score. Do you sum up the pixel intensity values of each channel and then the one with the highest intensity is the one with most attention?