Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Zhokhov
841da92f4d add code coverage report 2018-08-13 10:44:49 -07:00
Peter Zhokhov
624231827c merged benchmarks branch 2018-08-13 09:28:10 -07:00
6 changed files with 8 additions and 4 deletions

View File

@@ -1 +1 @@
ppo2

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@
.pytest_cache
.DS_Store
.idea
.coverage
# Setuptools distribution and build folders.
/dist/

View File

@@ -139,3 +139,4 @@ To cite this repository in publications:
journal = {GitHub repository},
howpublished = {\url{https://github.com/openai/baselines}},
}

View File

@@ -156,7 +156,7 @@ class FrameStack(gym.Wrapper):
self.k = k
self.frames = deque([], maxlen=k)
shp = env.observation_space.shape
self.observation_space = spaces.Box(low=0, high=255, shape=(shp[0], shp[1], shp[2] * k), dtype=np.uint8)
self.observation_space = spaces.Box(low=0, high=255, shape=(shp[0], shp[1], shp[2] * k), dtype=env.observation_space.dtype)
def reset(self):
ob = self.env.reset()
@@ -176,6 +176,7 @@ class FrameStack(gym.Wrapper):
class ScaledFloatFrame(gym.ObservationWrapper):
def __init__(self, env):
gym.ObservationWrapper.__init__(self, env)
self.observation_space = gym.spaces.Box(low=0, high=1, shape=env.observation_space.shape, dtype=np.float32)
def observation(self, observation):
# careful! This undoes the memory optimization, use

View File

@@ -138,7 +138,7 @@ def conv_only(convs=[(32, 8, 4), (64, 4, 2), (64, 3, 1)], **conv_kwargs):
'''
def network_fn(X):
out = X
out = tf.cast(X, tf.float32) / 255.
with tf.variable_scope("convnet"):
for num_outputs, kernel_size, stride in convs:
out = layers.convolution2d(out,

View File

@@ -25,7 +25,8 @@ setup(name='baselines',
extras_require={
'test': [
'filelock',
'pytest'
'pytest',
'pytest-cov',
]
},
description='OpenAI baselines: high quality implementations of reinforcement learning algorithms',