Thanks for the open source code of "On the Importance of Gradients for Detecting
Distributional Shifts in the Wild", we can easily experiment with our method based on their work.


For the detail of Dataset Preparation and Pre-trained Model Preparation, please check out https://github.com/deeplearning-wisc/gradnorm_ood

Your can run the cmd below to evaluate our method RG on OOD datasets iNaturalist.

python test_ood.py \
--name test_RG_iNaturalist \
--in_datadir dataset/id_data/ILSVRC-2012/val \
--out_datadir dataset/ood_data/iNaturalist\
--model_path checkpoints/pretrained_models/BiT-S-R101x1-flat-finetune.pth.tar \
--batch 64 \
--logdir checkpoints/test_log \
--score RG

