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
e9dbef6b
Unverified
Commit
e9dbef6b
authored
Aug 30, 2018
by
Mark Daoust
Committed by
GitHub
Aug 30, 2018
Browse files
Subtract the entropy to encourage exploration.
parent
949b1987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
research/a3c_blogpost/a3c_cartpole.py
research/a3c_blogpost/a3c_cartpole.py
+1
-1
No files found.
research/a3c_blogpost/a3c_cartpole.py
View file @
e9dbef6b
...
...
@@ -353,7 +353,7 @@ class Worker(threading.Thread):
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