| 指标 | 值 |
|---|---|
| 设备 | Ascend 910B4 |
| 精度 | float32 |
| Cosine Similarity | 1.000000 |
| Max Absolute Error | 0.003327 |
| NPU 推理时间 | 5.71ms |
python3 inference.py
=== repvgg_a0.rvgg_in1k ===
Dtype: torch.float32
--- CPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.08531028032302856, 1.1234593391418457, 2.709357976913452, 1.1326724290847778, 3.8596112728118896]
推理时间: 185.22ms
--- NPU 推理 ---
输出形状: torch.Size([1, 1000])
输出前5值: [-0.08264018595218658, 1.122761845588684, 2.7096107006073, 1.1326044797897339, 3.859178066253662]
推理时间: 5.71ms
=== 精度对比 ===
Cosine Similarity: 1.000000
Max Absolute Error: 0.003327
Relative Error: 0.031618
✓ NPU 适配通过CPU 与 NPU 推理结果对比:
# 安装依赖
pip install torch torch_npu timm huggingface_hub safetensors
# 运行推理
python3 inference.py本适配由 vision-encoder-npu-adapt Agent Skill 自动完成,包含: