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
SparseConvNet
Commits
11274575
Commit
11274575
authored
Jan 15, 2018
by
Benjamin Thomas Graham
Browse files
Variable(..) before softmax in classificationTrainValidate
parent
15fd91a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
PyTorch/sparseconvnet/classificationTrainValidate.py
PyTorch/sparseconvnet/classificationTrainValidate.py
+1
-1
No files found.
PyTorch/sparseconvnet/classificationTrainValidate.py
View file @
11274575
...
@@ -35,7 +35,7 @@ def updateStats(stats, output, target, loss):
...
@@ -35,7 +35,7 @@ def updateStats(stats, output, target, loss):
# Top-5 score
# Top-5 score
l
=
min
(
5
,
correct
.
size
(
1
))
l
=
min
(
5
,
correct
.
size
(
1
))
stats
[
'top5'
]
+=
correct
.
narrow
(
1
,
0
,
l
).
sum
()
stats
[
'top5'
]
+=
correct
.
narrow
(
1
,
0
,
l
).
sum
()
stats
[
'confusion matrix'
].
index_add_
(
0
,
target
,
F
.
softmax
(
output
).
data
)
stats
[
'confusion matrix'
].
index_add_
(
0
,
target
,
F
.
softmax
(
Variable
(
output
)
,
1
)
.
data
)
def
ClassificationTrainValidate
(
model
,
dataset
,
p
):
def
ClassificationTrainValidate
(
model
,
dataset
,
p
):
...
...
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