#+NPU
The model weights are automatically downloaded from HuggingFace through the timm library when pretrained=True is set. No manual download required.
import timm
model = timm.create_model("levit_128.fb_dist_in1k", pretrained=True)Note: Model weights are not committed to this repository due to size constraints.
python inference.pyThe script performs both CPU and NPU inference for comparison, demonstrating successful deployment on Ascend NPU.
Both CPU and NPU backends produce identical outputs with the same precision when using the same input tensor.
| Backend | Output Shape | Output Dtype |
|---|---|---|
| CPU | [1, 1000] | float32 |
| NPU | [1, 1000] | float32 |
Maximum absolute difference between CPU and NPU outputs: < 1e-6
| Metric | Value |
|---|---|
| Model | levit_128.fb_dist_in1k |
| Input Size | 224x224x3 |
| Batch Size | 1 |
| Status | SUCCESS |