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
99491464
Unverified
Commit
99491464
authored
Jan 16, 2018
by
Neal Wu
Committed by
GitHub
Jan 16, 2018
Browse files
Merge pull request #3140 from ashaw596/patch-1
Fix bug in gym_wrapper.
parents
c0cb0da1
5105ce71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
research/pcl_rl/gym_wrapper.py
research/pcl_rl/gym_wrapper.py
+2
-2
No files found.
research/pcl_rl/gym_wrapper.py
View file @
99491464
...
@@ -92,14 +92,14 @@ class GymWrapper(object):
...
@@ -92,14 +92,14 @@ class GymWrapper(object):
def
step
(
self
,
actions
):
def
step
(
self
,
actions
):
def
env_step
(
action
):
def
env_step
(
env
,
action
):
action
=
self
.
env_spec
.
convert_action_to_gym
(
action
)
action
=
self
.
env_spec
.
convert_action_to_gym
(
action
)
obs
,
reward
,
done
,
tt
=
env
.
step
(
action
)
obs
,
reward
,
done
,
tt
=
env
.
step
(
action
)
obs
=
self
.
env_spec
.
convert_obs_to_list
(
obs
)
obs
=
self
.
env_spec
.
convert_obs_to_list
(
obs
)
return
obs
,
reward
,
done
,
tt
return
obs
,
reward
,
done
,
tt
actions
=
zip
(
*
actions
)
actions
=
zip
(
*
actions
)
outputs
=
[
env_step
(
action
)
outputs
=
[
env_step
(
env
,
action
)
if
not
done
else
(
self
.
env_spec
.
initial_obs
(
None
),
0
,
True
,
None
)
if
not
done
else
(
self
.
env_spec
.
initial_obs
(
None
),
0
,
True
,
None
)
for
action
,
env
,
done
in
zip
(
actions
,
self
.
envs
,
self
.
dones
)]
for
action
,
env
,
done
in
zip
(
actions
,
self
.
envs
,
self
.
dones
)]
for
i
,
(
_
,
_
,
done
,
_
)
in
enumerate
(
outputs
):
for
i
,
(
_
,
_
,
done
,
_
)
in
enumerate
(
outputs
):
...
...
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