Model card for swin_small_patch4_window7_224 adapted for Ascend NPU.
import timm
import torch
model = timm.create_model("swin_small_patch4_window7_224", pretrained=True, num_classes=1000)
model = model.to("npu:0")
model.eval()
# Run inference
with torch.no_grad():
output = model(input_tensor)This model has been validated to produce matching outputs between CPU and NPU backends within 1% tolerance.
Apache 2.0