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
ba3cb317
Commit
ba3cb317
authored
Jan 08, 2017
by
Martin Wicke
Committed by
GitHub
Jan 08, 2017
Browse files
Update losses.py
parent
bda41af1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
inception/inception/slim/losses.py
inception/inception/slim/losses.py
+2
-2
No files found.
inception/inception/slim/losses.py
View file @
ba3cb317
...
...
@@ -163,8 +163,8 @@ def cross_entropy_loss(logits, one_hot_labels, label_smoothing=0,
smooth_positives
=
1.0
-
label_smoothing
smooth_negatives
=
label_smoothing
/
num_classes
one_hot_labels
=
one_hot_labels
*
smooth_positives
+
smooth_negatives
cross_entropy
=
tf
.
nn
.
softmax_cross_entropy_with_logits
(
logits
,
one_hot_labels
,
cross_entropy
=
tf
.
nn
.
softmax_cross_entropy_with_logits
(
logits
=
logits
,
labels
=
one_hot_labels
,
name
=
'xentropy'
)
weight
=
tf
.
convert_to_tensor
(
weight
,
dtype
=
logits
.
dtype
.
base_dtype
,
...
...
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