This document describes the step-by-step instructions for reproducing PyTorch se_resnext tuning and benchmarking results with Intel® Neural Compressor.
Python 3.6 or higher version is recommended. The dependent packages are all in requirements, please install as following.
cd examples/pytorch/image_recognition/se_resnext/quantization/ptq/fx
pip install -r requirements.txt
git clone https://github.com/Cadene/pretrained-models.pytorch.git
cd pretrained-models.pytorch
git checkout 8aae3d8f1135b6b13fed79c1d431e3449fdbf6e0
python setup.py install
cd ..
Note
Please don't install public pretrainedmodels package.
Download ImageNet Raw image to dir: /path/to/imagenet. The dir should include below folder:
ls /path/to/imagenet
train val
python run_eval.py \
--data /path/to/imagenet \
-a se_resnext50_32x4d \
-b 128 \
-j 1 \
-t
# int8
sh run_benchmark.sh --int8=true --config=saved_results --mode=performance --input_model=se_resnext50_32x4d --dataset_location=/path/to/imagenet
# fp32
sh run_benchmark.sh --mode=performance --input_model=se_resnext50_32x4d --dataset_location=/path/to/imagenet
Please refer SE_ResNext README.