thuml / TransNorm

Code release for "Transferable Normalization: Towards Improving Transferability of Deep Neural Networks" (NeurIPS 2019)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

visualization

Sir-Death opened this issue · comments

Hi,I would like to know how to do the channel visualization in the paper. Could you please share the code? Thank you very much

vis.py.zip

Sure. Please kindly find the source code of channel visualization in the attachment.

Thank you very much

Sorry to bother you again, but I want to know how to get feature map in the source code

屏幕快照 2020-11-13 16 26 28

You can simply edit the code of the forward function of ResNet and return the feature maps of all channels. For example, in the feature_maps here in the attachment has a size of [N, 64, 112, 112]. After that, you can select the specific channel you would like to visualize in the main function by feature_map = feature_maps[image_index, channel_index, :, :].

Thank you very much for your patience. I have solved it.