Skip to content

Commit

Permalink
image normalisation hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hill-a committed Sep 5, 2018
1 parent 0b128fd commit 1934d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable_baselines/common/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def observation_input(ob_space, batch_size=None, name='Ob', scale=False):
# rescale to [1, 0] if the bounds are defined
if (scale and
not np.any(np.isinf(ob_space.low)) and not np.any(np.isinf(ob_space.high)) and
np.any(ob_space.high - ob_space.low) != 0):
np.any((ob_space.high - ob_space.low) != 0)):

# equivalent to processed_x / 255.0 when bounds are set to [255, 0]
processed_x = ((processed_x - ob_space.low) / (ob_space.high - ob_space.low))
Expand Down

0 comments on commit 1934d60

Please sign in to comment.