Commit 23703c9d authored by Sze-qq's avatar Sze-qq Committed by Frank Lee
Browse files

[NFC] polish colossalai/nn/metric/_utils.py code style (#1727)

parent 754aa7c8
import torch
def calc_acc(logits, targets):
preds = torch.argmax(logits, dim=-1)
correct = torch.sum(targets == preds)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment