xujiashuai/timm-cv_resnet50.tv_in1k
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

resnet50.tv_in1k on Ascend NPU

1. 简介

  • 模型来源: timm/resnet50.tv_in1k
  • 架构: ResNet-50 (TorchVision v1)
  • 参数量: ~25.6M
  • 任务: Image Classification (ImageNet-1K, 1000类)
  • 适配状态: SUCCESS

2. 验证环境

组件版本
torch2.9.0
torch-npu2.9.0.post1
timm1.0.27
CANN8.5.1
NPUAscend 910B4

3. 推理脚本

python inference.py --device npu:0 --dtype float32

4. 推理输出证据

模型: cv_resnet50.tv_in1k
设备: npu:0
精度: float32
------------------------------------------------------------
权重加载完成

--- CPU 推理 ---
输出形状: [1, 1000]
Logits 前5个: [-1.0667042   0.02221543 -0.20466329 -1.0716336   0.40075082]
是否有 NaN: False
预测类别: 490

--- NPU 推理 (npu:0) ---
输出形状: [1, 1000]
Logits 前5个: [-1.0658878   0.02166335 -0.20490454 -1.0724306   0.40001586]
是否有 NaN: False
预测类别: 490

--- 精度对比 ---
Cosine Similarity: 1.000000
Max Abs Error: 0.002730

--- 性能基准 ---
平均延迟: 5.27 ms (10轮)

✓ 推理完成

5. CPU vs NPU 精度对比

指标数值
Cosine Similarity1.000000
Max Abs Error0.002730
预测类别一致是 (490)

6. 性能参考

指标数值
平均延迟5.27 ms
测试轮数10