Skip to content

Commit fa21bce

Browse files
authored
Clarifying the documentation for custom env using images as observations (#2085)
1 parent 8c78653 commit fa21bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guide/custom_env.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ That is to say, your environment must implement the following methods (and inher
99

1010
.. note::
1111

12-
If you are using images as input, the observation must be of type ``np.uint8`` and be contained in [0, 255].
13-
By default, the observation is normalized by SB3 pre-processing (dividing by 255 to have values in [0, 1]) when using CNN policies.
12+
If you are using images as input, the observation must be of type ``np.uint8`` and be within a space ``Box`` bounded by [0, 255] (``Box(low=0, high=255, shape=(<your image shape>)``).
13+
By default, the observation is normalized by SB3 pre-processing (dividing by 255 to have values in [0, 1], i.e. ``Box(low=0, high=1)``) when using CNN policies.
1414
Images can be either channel-first or channel-last.
1515

1616
If you want to use ``CnnPolicy`` or ``MultiInputPolicy`` with image-like observation (3D tensor) that are already normalized, you must pass ``normalize_images=False``

0 commit comments

Comments
 (0)