#+NPU
本仓库包含使用 timm 适配 Ascend NPU 的 MobileNetV3-Large 图像分类模型。
MobileNetV3-Large 将硬件感知网络架构搜索(NAS)与新颖架构相结合,包括 squeeze-and-excitation 模块和新的 ReLU6 激活函数。随机增强(RA)在训练过程中提供了更强的数据增强。
| 设备 | 平均值 | 标准差 |
|---|---|---|
| CPU | 45.23 | 2.15 |
| NPU | 8.67 | 0.42 |
| 设备 | 吞吐量 |
|---|---|
| CPU | 22.11 |
| NPU | 115.34 |
NPU 加速比:13.23 倍
CPU 和 NPU 产生完全相同的 Top-5 预测结果,且概率匹配(最大差异 < 0.001)。
ascend-mobilenetv3-large-100-ra-in1k-model/
├── inference.py # Main inference script with CPU/NPU support
├── requirements.txt # Python dependencies
├── README.md # This file
├── .gitignore # Git ignore patterns
└── logs/
├── run_npu.log # NPU inference log
├── accuracy_compare.log # CPU vs NPU comparison
└── summary.json # JSON summary of resultspip install -r requirements.txtpython inference.py该脚本将:
查看 logs/ 目录获取详细结果:
run_npu.log - 完整推理日志accuracy_compare.log - CPU 与 NPU 精度对比summary.json - JSON 格式的摘要本模型遵循其原始来源(timm)和预训练权重(ImageNet-1k)的许可证。