Skip to content

Davidelanz/resnet_attention_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualize ResNet Attention Layers

Tool for attention visualization in ResNets inner layers. The models used are the torchvision pretrained ones (see this link for further details)

A modified ResNet class, called ResNetAT, is available at resnet_at.py, along with the functions to initialize the different ResNet architectures. ResNetAT's forward method is defined sucht that the inner layers' outputs are available as model's outputs.

Requirements

Python 3.6

Pypi Package Version
matplotlib 3.3.2
numpy 1.19.4
Pillow 8.0.1
torch 1.7.0
torchvision 0.8.1

Results

Summary
ResNet18 ResNet34 ResNet50 ResNet101 ResNet152
ResNet18 ResNet34 ResNet50 ResNet101 ResNet152
ResNeXt50_32x4d ResNeXt101_32x8d WideResNet50_2 WideResNet101_2
ResNeXt50_32x4d ResNeXt101_32x8d WideResNet50_2 WideResNet101_2

Details

ResNet18

ResNet18

ResNet34

ResNet34

ResNet50

ResNet50

ResNet101

ResNet101

ResNet152

ResNet152

ResNeXt50_32x4d

ResNeXt50_32x4d

ResNeXt101_32x8d

ResNeXt101_32x8d

WideResNet50_2

WideResNet50_2

WideResNet101_2

WideResNet101_2

About

Tool for attention visualization in ResNets inner layers.

Topics

Resources

Stars

Watchers

Forks

Languages