Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
542e00f2
You need to sign in or sign up before continuing.
Commit
542e00f2
authored
Aug 08, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix
parent
e28d616e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
examples/OpenAIGym/README.md
examples/OpenAIGym/README.md
+9
-1
examples/OpenAIGym/run-atari.py
examples/OpenAIGym/run-atari.py
+0
-1
scripts/dump-model-params.py
scripts/dump-model-params.py
+1
-1
tensorpack/RL/envbase.py
tensorpack/RL/envbase.py
+6
-0
No files found.
examples/OpenAIGym/README.md
View file @
542e00f2
#
Steps to reproduce
:
#
To run pretrained model
:
1.
install
[
tensorpack
](
https://github.com/ppwwyyxx/tensorpack
)
2.
Download models from
[
model zoo
](
https://drive.google.com/open?id=0B9IPQTvr2BBkS0VhX0xmS1c5aFk
)
3.
`ENV=NAME_OF_ENV ./run-atari.py --load "$ENV".tfmodel --env "$ENV"`
<!--
-Models are available for the following gym environments:
-
-+
[
Breakout-v0
](
https://gym.openai.com/envs/Breakout-v0
)
-->
Note that atari game settings in gym is very different from DeepMind papers, therefore the scores are not comparable.
examples/OpenAIGym/run-atari.py
View file @
542e00f2
...
...
@@ -34,7 +34,6 @@ def get_player(viz=False, train=False, dumpdir=None):
pl
=
HistoryFramePlayer
(
pl
,
FRAME_HISTORY
)
if
not
train
:
pl
=
PreventStuckPlayer
(
pl
,
30
,
1
)
pl
=
LimitLengthPlayer
(
pl
,
40000
)
return
pl
class
MySimulatorWorker
(
SimulatorProcess
):
...
...
scripts/dump-model-params.py
View file @
542e00f2
...
...
@@ -33,7 +33,7 @@ with tf.Graph().as_default() as G:
init
=
sessinit
.
ParamRestore
(
np
.
load
(
args
.
model
)
.
item
())
else
:
init
=
sessinit
.
SaverRestore
(
args
.
model
)
sess
=
tf
.
Session
()
sess
=
tf
.
Session
(
config
=
tf
.
ConfigProto
(
allow_soft_placement
=
True
)
)
init
.
init
(
sess
)
# dump ...
...
...
tensorpack/RL/envbase.py
View file @
542e00f2
...
...
@@ -88,6 +88,12 @@ class DiscreteActionSpace(ActionSpace):
def
num_actions
(
self
):
return
self
.
num
def
__repr__
(
self
):
return
"DiscreteActionSpace({})"
.
format
(
self
.
num
)
def
__str__
(
self
):
return
"DiscreteActionSpace({})"
.
format
(
self
.
num
)
class
NaiveRLEnvironment
(
RLEnvironment
):
""" for testing only"""
def
__init__
(
self
):
...
...
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