This is the official code for NeurIPS 2022 paper "Rank Diminishing in Deep Neural Networks".
We perform a rigorous study on the behavior of network rank, focusing particularly on the notion of rank deficiency.
python=3.8
torch>=1.8.0
torchvision>=0.8.0
timm
tqdm
python rank_jacobian.py -m resnet50 --imagenet_dir /Path/to/ImageNet/ --weight_dir Path/to/Weights/
python rank_perturb.py -m resnet50 --imagenet_dir /Path/to/ImageNet/ --weight_dir Path/to/Weights/
python extract_feature.py -m resnet50 --imagenet_dir /Path/to/ImageNet/ --weight_dir Path/to/Weights/
python run_cls_dim.py -m resnet50
python extract_feature.py -m resnet50 --imagenet_dir /Path/to/ImageNet/ --weight_dir Path/to/Weights/
python run_deficit.py -m resnet50
If you find this code useful, please kindly cite our paper.