Skip to content

Conversation

@ShawnXuan
Copy link
Collaborator

@ShawnXuan ShawnXuan commented Sep 23, 2024

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

# 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.

2 participants