| 指标 | 值 |
|---|---|
| 设备 | Ascend 910B4 |
| 精度 | float32 |
| Cosine Similarity | 1.000000 |
| Max Absolute Error | 0.002352 |
| NPU 推理时间 | 14.49ms |
python3 inference.py
=== ghostnetv2_100.in1k ===
Dtype: torch.float32
--- CPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.9079675674438477, 0.0586068369448185, -0.32857614755630493, -0.35240447521209717, -0.3611944913864136]
推理时间: 306.25ms
--- NPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.9083774089813232, 0.058787889778614044, -0.32843396067619324, -0.3517896831035614, -0.360188364982605]
推理时间: 14.49ms
=== 精度对比 ===
Cosine Similarity: 1.000000
Max Absolute Error: 0.002352
Relative Error: 0.005351
✓ NPU 适配通过CPU 与 NPU 推理结果对比:
# 安装依赖
pip install torch torch_npu timm huggingface_hub safetensors
# 运行推理
python3 inference.py本适配由 vision-encoder-npu-adapt Agent Skill 自动完成,包含: