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
ModelZoo
ResNet50_tensorflow
Commits
bf321a6f
Commit
bf321a6f
authored
Feb 28, 2017
by
Neal Wu
Browse files
Logits and labels were out of order when computing loss
parent
9dd2c618
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
slim/train_image_classifier.py
slim/train_image_classifier.py
+3
-2
No files found.
slim/train_image_classifier.py
View file @
bf321a6f
...
...
@@ -470,10 +470,11 @@ def main(_):
#############################
if
'AuxLogits'
in
end_points
:
tf
.
losses
.
softmax_cross_entropy
(
end_points
[
'AuxLogits'
],
labels
,
logits
=
end_points
[
'AuxLogits'
],
onehot_labels
=
labels
,
label_smoothing
=
FLAGS
.
label_smoothing
,
weights
=
0.4
,
scope
=
'aux_loss'
)
tf
.
losses
.
softmax_cross_entropy
(
logits
,
labels
,
label_smoothing
=
FLAGS
.
label_smoothing
,
weights
=
1.0
)
logits
=
logits
,
onehot_labels
=
labels
,
label_smoothing
=
FLAGS
.
label_smoothing
,
weights
=
1.0
)
return
end_points
# Gather initial summaries.
...
...
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