xujiashuai/hardcorenas_a.miil_green_in1k
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

timm-hardcorenas_a.miil_green_in1k - 昇腾 NPU 适配

1. 模型信息

  • 模型: timm-hardcorenas_a.miil_green_in1k
  • 来源: timm
  • 任务: ImageNet 图像分类
  • 分辨率: 224x224

2. 昇腾 NPU 适配结果

指标值
设备Ascend 910B4
精度float32
余弦相似度1.000000
最大绝对误差0.001457
NPU 推理时间4.49ms

3. 推理脚本

python3 inference.py

4. 推理输出证据

=== hardcorenas_a.miil_green_in1k ===
Dtype: torch.float32
Resolution: 224

--- CPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [0.10541830211877823, -0.325479120016098, -0.043249551206827164, -0.3230379521846771, -0.26298707723617554]
推理时间: 92.25ms

--- NPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [0.10611006617546082, -0.324933797121048, -0.0440649688243866, -0.3238915801048279, -0.26340344548225403]
推理时间: 4.49ms

=== 精度对比 ===
Cosine Similarity: 1.000000
Max Absolute Error: 0.001457
Relative Error: 0.003483

✓ NPU 适配通过

5. 精度校验

CPU 与 NPU 推理结果对比:

  • 余弦相似度:1.000000 (> 0.99 通过)
  • 最大绝对误差:0.001457