Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
23703c9d
Commit
23703c9d
authored
Oct 18, 2022
by
Sze-qq
Committed by
Frank Lee
Oct 19, 2022
Browse files
[NFC] polish colossalai/nn/metric/_utils.py code style (#1727)
parent
754aa7c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
colossalai/nn/metric/_utils.py
colossalai/nn/metric/_utils.py
+1
-0
No files found.
colossalai/nn/metric/_utils.py
View file @
23703c9d
import
torch
def
calc_acc
(
logits
,
targets
):
preds
=
torch
.
argmax
(
logits
,
dim
=-
1
)
correct
=
torch
.
sum
(
targets
==
preds
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment