The official PyTorch implementation of "SRM : A Style-based Recalibration Module for Convolutional Neural Networks" for ImageNet. SRM is a lightweight architectural unit that dynamically recalibrates feature responses based on style importance.
- PyTorch 0.4.0+
- Python 3.6
- CUDA 8.0+
- Train ResNet-50
python imagenet.py --depth 50 --data /data/imagenet/ILSVRC2012 --gpu-id 0,1,2,3,4,5,6,7 --checkpoint resnet50/baseline
- Train SRM-ResNet-50
python imagenet.py --depth 50 --data /data/imagenet/ILSVRC2012 --gpu-id 0,1,2,3,4,5,6,7 --checkpoint resnet50/srm --recalibration-type srm
- Train SE-ResNet-50
python imagenet.py --depth 50 --data /data/imagenet/ILSVRC2012 --gpu-id 0,1,2,3,4,5,6,7 --checkpoint resnet50/se --recalibration-type se
- Train GE-ResNet-50
python imagenet.py --depth 50 --data /data/imagenet/ILSVRC2012 --gpu-id 0,1,2,3,4,5,6,7 --checkpoint resnet50/ge --recalibration-type ge
This code is heavily borrowed from pytorch-classification.
- 28/05/2019: initial code for ImageNet is released