Residual Networks, or ResNets, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping.
| GPU | IXUCA SDK | Release | Branch |
|---|---|---|---|
| MR-V100 | 4.4.0 | 26.03 | release/26.03 |
| MR-V100 | 4.3.0 | 25.12 | release/25.12 |
Note: 请切换到与您的 SDK 版本对应的 Release 分支进行测试。请勿直接在 master 分支上运行测试,因为 master 分支可能包含与您的本地 SDK 版本不兼容的最新更改。
切换分支命令示例:
git checkout release/26.03
Pretrained model: https://download.openmmlab.com/mmclassification/v0/resnet/resnetv1d50_b32x8_imagenet_20210531-db14775a.pth
Dataset: https://www.image-net.org/download.php to download the validation dataset.
# Install libGL
## CentOS
yum install -y mesa-libGL
## Ubuntu
apt install -y libgl1-mesa-glx
pip3 install -r ../../ixrt_common/requirements.txt
pip3 install --no-build-isolation mmcv==1.5.3 mmcls==0.24.0 ppq pycuda transformers==4.37.1 ninja onnx==1.18.0# git clone mmpretrain
git clone -b v0.24.0 https://github.com/open-mmlab/mmpretrain.git
mkdir checkpoints
# export onnx model
python3 ../../ixrt_common/export_mmcls.py --cfg mmpretrain/configs/resnet/resnetv1d50_b32x8_imagenet.py --weight resnetv1d50_b32x8_imagenet_20210531-db14775a.pth --output checkpoints/resnet_v1_d50.onnxexport PROJ_DIR=./
export DATASETS_DIR=/path/to/imagenet_val/
export CHECKPOINTS_DIR=./checkpoints
export RUN_DIR=../../ixrt_common/
export CONFIG_DIR=../../ixrt_common/config/RESNETV1D50_CONFIG# Accuracy
bash scripts/infer_resnetv1d50_fp16_accuracy.sh
# Performance
bash scripts/infer_resnetv1d50_fp16_performance.sh# Accuracy
bash scripts/infer_resnetv1d50_int8_accuracy.sh
# Performance
bash scripts/infer_resnetv1d50_int8_performance.sh| Model | BatchSize | Precision | FPS | Top-1(%) | Top-5(%) |
|---|---|---|---|---|---|
| ResNet_V1_D50 | 32 | FP16 | 3887.55 | 0.77544 | 0.93568 |
| ResNet_V1_D50 | 32 | INT8 | 7148.58 | 0.7711 | 0.93514 |