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
5b31b843
Unverified
Commit
5b31b843
authored
Jan 20, 2022
by
小桐桐
Committed by
GitHub
Jan 20, 2022
Browse files
Fix pcl_rl bugs (#10465)
parent
f08513d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
research/pcl_rl/controller.py
research/pcl_rl/controller.py
+2
-2
research/pcl_rl/env_spec.py
research/pcl_rl/env_spec.py
+2
-2
No files found.
research/pcl_rl/controller.py
View file @
5b31b843
...
@@ -204,8 +204,8 @@ class Controller(object):
...
@@ -204,8 +204,8 @@ class Controller(object):
observations
,
actions
,
rewards
,
observations
,
actions
,
rewards
,
pads
)
=
self
.
_sample_episodes
(
sess
,
greedy
=
greedy
)
pads
)
=
self
.
_sample_episodes
(
sess
,
greedy
=
greedy
)
observations
=
zip
(
*
observations
)
observations
=
list
(
zip
(
*
observations
)
)
actions
=
zip
(
*
actions
)
actions
=
list
(
zip
(
*
actions
)
)
terminated
=
np
.
array
(
self
.
env
.
dones
)
terminated
=
np
.
array
(
self
.
env
.
dones
)
...
...
research/pcl_rl/env_spec.py
View file @
5b31b843
...
@@ -175,7 +175,7 @@ class EnvSpec(object):
...
@@ -175,7 +175,7 @@ class EnvSpec(object):
if
batched
:
if
batched
:
return
obs
return
obs
else
:
else
:
return
zip
(
*
obs
)[
0
]
return
list
(
zip
(
*
obs
)
)
[
0
]
def
initial_act
(
self
,
batch_size
=
None
):
def
initial_act
(
self
,
batch_size
=
None
):
batched
=
batch_size
is
not
None
batched
=
batch_size
is
not
None
...
@@ -191,7 +191,7 @@ class EnvSpec(object):
...
@@ -191,7 +191,7 @@ class EnvSpec(object):
if
batched
:
if
batched
:
return
act
return
act
else
:
else
:
return
zip
(
*
act
)[
0
]
return
list
(
zip
(
*
act
)
)
[
0
]
def
is_discrete
(
self
,
typ
):
def
is_discrete
(
self
,
typ
):
return
typ
==
spaces
.
discrete
return
typ
==
spaces
.
discrete
...
...
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