Table of Contents

Class GrayscaleObservationVector<TObs, TAct>

Namespace
Gym.Wrappers.Vector
Assembly
Gym.dll

Turns each sub-env's RGB image gray (Gymnasium's vector GrayscaleObservation).

[PyName("GrayscaleObservation")]
public class GrayscaleObservationVector<TObs, TAct> : VectorizeTransformObservation<NDArray, TObs, TAct>, IVectorEnv, IDisposable

Type Parameters

TObs

The env's batched observation type.

TAct

The batched action type, passed through.

Inheritance
VectorWrapper<NDArray, TAct, TObs, TAct>
GrayscaleObservationVector<TObs, TAct>
Implements
Inherited Members
Extension Methods

Remarks

Constructors

GrayscaleObservationVector(VectorEnv<TObs, TAct>, bool)

Wraps env.

public GrayscaleObservationVector(VectorEnv<TObs, TAct> env, bool keepDim = false)

Parameters

env VectorEnv<TObs, TAct>

The vector env, whose single space is a uint8 RGB image box.

keepDim bool

Whether the gray image keeps a channel axis of 1.

Exceptions

ValueError

Thrown for a space that is not an RGB image, with Gymnasium's messages.