greentfrapp / lucent

Lucid library adapted for PyTorch
Apache License 2.0
597 stars 89 forks source link

Adding ResNet models to Lucent #41

Closed atagade closed 1 year ago

atagade commented 1 year ago

I've added a ResNet-18 module created from a ResNet module that can be used to create all ResNet family models (inspired by torchvision). These models also have the ability to use only linear modules and skip the last batchnorm of any layer to facilitate better feature visualisation. The forward method also has the ability to return intermediate layer activations to help with calculating activations.

This notebook: https://colab.research.google.com/drive/1ESyka2ZQXNJUmQH4zo9suVSFZXbow0Rz?usp=sharing demonstrates the use of this module.