Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
13530934
baselines
Commits
4862140c
Commit
4862140c
authored
Jul 23, 2017
by
Jan Humplik
Browse files
Use standardized advantages in trpo.
parent
df82a15f
Changes
1
Hide whitespace changes
Inline
Side-by-side
baselines/trpo_mpi/trpo_mpi.py
View file @
4862140c
...
...
@@ -207,7 +207,7 @@ def learn(env, policy_func, *,
if
hasattr
(
pi
,
"ret_rms"
):
pi
.
ret_rms
.
update
(
tdlamret
)
if
hasattr
(
pi
,
"ob_rms"
):
pi
.
ob_rms
.
update
(
ob
)
# update running mean/std for policy
args
=
seg
[
"ob"
],
seg
[
"ac"
],
seg
[
"adv"
]
args
=
seg
[
"ob"
],
seg
[
"ac"
],
atarg
fvpargs
=
[
arr
[::
5
]
for
arr
in
args
]
def
fisher_vector_product
(
p
):
return
allmean
(
compute_fvp
(
p
,
*
fvpargs
))
+
cg_damping
*
p
...
...
@@ -288,4 +288,4 @@ def learn(env, policy_func, *,
logger
.
dump_tabular
()
def
flatten_lists
(
listoflists
):
return
[
el
for
list_
in
listoflists
for
el
in
list_
]
\ No newline at end of file
return
[
el
for
list_
in
listoflists
for
el
in
list_
]
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