xujiashuai/timm-swinv2_large_window12to24_192to384.ms_in22k_ft_in1k
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

timm/swinv2_large_window12to24_192to384.ms_in22k_ft_in1k - Ascend NPU Adaptation

1. Model Overview

SwinV2 Large is a large hierarchical Vision Transformer with shifted windows, trained on ImageNet-22k and fine-tuned on ImageNet-1k. Uses progressive window size increase from 12 to 24 and resolution from 192 to 384.

  • Original: timm/swinv2_large_window12to24_192to384.ms_in22k_ft_in1k
  • Architecture: SwinV2 Transformer (Large)
  • Parameters: 196,739,932
  • Input Resolution: 384x384
  • Output Classes: 1000

2. NPU Adaptation

  • Device: Ascend NPU (npu:0)
  • Framework: PyTorch + torch_npu

3. Accuracy

MetricValue
Cosine Similarity0.999992
Max Abs Error0.006605

4. Latency

DeviceAvg Latency
NPU (npu:0)74.61 ms

5. CPU vs NPU

MetricCPUNPU
Output Shape[1, 1000][1, 1000]
Prediction111111

6. Usage

source setup_env.sh
HF_ENDPOINT=https://hf-mirror.com python3 inference.py --device npu:0