6 Star 7 Fork 7

DeepSpark/DeepSparkInference

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
majorli6 提交于 2024-05-29 16:10 . format markdown docs

ResNet101

Description

ResNet101 is a convolutional neural network architecture that belongs to the ResNet (Residual Network) family.With a total of 101 layers, ResNet101 comprises multiple residual blocks, each containing convolutional layers with batch normalization and rectified linear unit (ReLU) activations. These residual blocks allow the network to effectively capture complex features at different levels of abstraction, leading to superior performance on image recognition tasks.

Setup

Install

pip3 install onnx
pip3 install tqdm

Download

Pretrained model: https://download.pytorch.org/models/resnet101-63fe2227.pth

Dataset: https://www.image-net.org/download.php to download the validation dataset.

Model Conversion

python3 export.py --weight resnet101-63fe2227.pth --output resnet101.onnx

Inference

export DATASETS_DIR=/Path/to/imagenet_val/

FP16

# Accuracy
bash scripts/infer_resnet101_fp16_accuracy.sh
# Performance
bash scripts/infer_resnet101_fp16_performance.sh

INT8

# Accuracy
bash scripts/infer_resnet101_int8_accuracy.sh
# Performance
bash scripts/infer_resnet101_int8_performance.sh

Results

Model BatchSize Precision FPS Top-1(%) Top-5(%)
ResNet101 32 FP16 2507.074 77.331 93.520
ResNet101 32 INT8 5458.890 76.719 93.348
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/deep-spark/deepsparkinference.git
git@gitee.com:deep-spark/deepsparkinference.git
deep-spark
deepsparkinference
DeepSparkInference
master

搜索帮助

Cb406eda 1850385 E526c682 1850385