0
$\begingroup$

I want to train a SAC algorithm from Stable Baselines 3 with a (100,210) shaped array as input. The array is a stack of observations cumulated along axis 0. The last row is current observation.

SAC Policy uses a simple flatten feature extractor for inputs :

class FlattenExtractor(BaseFeaturesExtractor):
    """
    Feature extract that flatten the input.
    Used as a placeholder when feature extraction is not needed.

    :param observation_space:
    """

    def __init__(self, observation_space: gym.Space) -> None:
        super().__init__(observation_space, get_flattened_obs_dim(observation_space))
        self.flatten = nn.Flatten()

    def forward(self, observations: th.Tensor) -> th.Tensor:
        return self.flatten(observations)

I wonder if there is a more efficient way to extract features of this type (maybe CNN)?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.