MadryLab / robustness

A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.
MIT License
903 stars 181 forks source link

Constant name for final feature layer for easier visualization #107

Open ThomasNorr opened 2 years ago

ThomasNorr commented 2 years ago

Hello, Is there a reason why the models sometimes use nn.AdaptiveAvgPool2d and sometimes no layer (F.avg_pool2d)? Always using nn.AdaptiveAvgPool2d with a constant layer name like avgpool or maybe final_features would help with visualizing the activations as the lucent library uses the name of the layer. https://github.com/MadryLab/DebuggableDeepNetworks can for example not visualize activations on cifar resnets out of the box because for cifar the resnet has no such layer.

Greetings Thomas