xujiashuai/timm-tf_efficientnetv2_b3_in21k
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

timm-tf_efficientnetv2_b3.in21k - Ascend NPU 适配

1. 模型信息

  • 模型: timm-tf_efficientnetv2_b3.in21k
  • 来源: timm
  • 任务: ImageNet-21k 图像分类

2. 昇腾 NPU 适配结果

指标值
设备Ascend 910B4
精度float32
Cosine Similarity1.000000
Max Absolute Error0.007704
NPU 推理时间11.80ms

3. 推理脚本

python3 inference.py

4. 推理输出证据

=== tf_efficientnetv2_b3 ===
Dtype: torch.float32

--- CPU 推理 ---
输出形状: torch.Size([1, 21843])
输出前5值: [-15.881783485412598, -11.772902488708496, -16.27715301513672, -2.272547960281372, -10.796887397766113]
推理时间: 314.41ms

--- NPU 推理 ---
输出形状: torch.Size([1, 21843])
输出前5值: [-15.880006790161133, -11.770761489868164, -16.275972366333008, -2.2724053859710693, -10.792441368103027]
推理时间: 11.80ms

=== 精度对比 ===
Cosine Similarity: 1.000000
Max Absolute Error: 0.007704
Relative Error: 0.000107

✓ NPU 适配通过

5. 精度校验

CPU 与 NPU 推理结果对比:

  • Cosine Similarity: 1.000000 (> 0.99 通过)
  • Max Absolute Error: 0.007704