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
949b1987
Unverified
Commit
949b1987
authored
Aug 30, 2018
by
Mark Daoust
Committed by
GitHub
Aug 30, 2018
Browse files
Remove double negative.
parent
7cb88e17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/a3c_blogpost/a3c_cartpole.py
research/a3c_blogpost/a3c_cartpole.py
+2
-2
No files found.
research/a3c_blogpost/a3c_cartpole.py
View file @
949b1987
...
...
@@ -348,12 +348,12 @@ class Worker(threading.Thread):
# Calculate our policy loss
policy
=
tf
.
nn
.
softmax
(
logits
)
entropy
=
-
tf
.
nn
.
softmax_cross_entropy_with_logits_v2
(
labels
=
policy
,
logits
=
logits
)
entropy
=
tf
.
nn
.
softmax_cross_entropy_with_logits_v2
(
labels
=
policy
,
logits
=
logits
)
policy_loss
=
tf
.
nn
.
sparse_softmax_cross_entropy_with_logits
(
labels
=
memory
.
actions
,
logits
=
logits
)
policy_loss
*=
tf
.
stop_gradient
(
advantage
)
policy_loss
-
=
0.01
*
entropy
policy_loss
=
0.01
*
entropy
total_loss
=
tf
.
reduce_mean
((
0.5
*
value_loss
+
policy_loss
))
return
total_loss
...
...
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