xujiashuai/timm-coat_lite_tiny.in1k-FE-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

timm-coat_lite_tiny.in1k - Ascend NPU 适配

1. 模型信息

  • 模型: timm-coat_lite_tiny.in1k
  • 来源: timm
  • 任务: ImageNet 图像分类

2. 昇腾 NPU 适配结果

指标值
设备Ascend 910B4
精度float32
Cosine Similarity0.999976
Max Absolute Error0.020105
NPU 推理时间7.27ms

3. 推理脚本

python3 inference.py

4. 推理输出证据

=== coat_lite_tiny.in1k ===
Dtype: torch.float32

--- CPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.469443678855896, -0.19310304522514343, -0.14344646036624908, -0.3358815610408783, -0.07744921743869781]
推理时间: 201.22ms

--- NPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.4679797887802124, -0.18757759034633636, -0.1433342695236206, -0.3346256613731384, -0.07607928663492203]
推理时间: 7.27ms

=== 精度对比 ===
Cosine Similarity: 0.999976
Max Absolute Error: 0.020105
Relative Error: 0.026274

✓ NPU 适配通过

5. 精度校验

  • Cosine Similarity: 0.999976 (> 0.99 通过)
  • Max Absolute Error: 0.020105

6. 复现步骤

pip install torch torch_npu timm huggingface_hub safetensors
python3 inference.py

7. 环境要求

  • Python 3.11+, PyTorch 2.9.0+, torch_npu 2.9.0+, CANN 8.5.1, Ascend 910B4

8. Agent Skill

本适配由 vision-encoder-npu-adapt Agent Skill 自动完成。