Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify to npu for CV models #306

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

modify to npu for CV models #306

wants to merge 1 commit into from

Conversation

ShawnXuan
Copy link
Collaborator

@ShawnXuan ShawnXuan commented Sep 23, 2024

临时改动,用于npu相关测试。


# compute output
output = model(images)

# measure accuracy and record loss
loss = criterion(output, target)
acc1, acc5 = accuracy(output, target, topk=(1, 5))
acc1, acc5 = accuracy(output.cpu(), target.cpu(), topk=(1, 5))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂时使用 cpu 进行topk的计算

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant