coach icon indicating copy to clipboard operation
coach copied to clipboard

Multiple observation inputs

Open yunzhe-tao opened this issue 4 years ago • 0 comments

Hi,

In my experiments, I wanted to use multiple observation inputs. In the preset, I defined it to be:

agent_params = ClippedPPOAgentParameters()
agent_params.network_wrappers['main'].input_embedders_parameters = {
        'front_camera': InputEmbedderParameters(),
        'lidar': InputEmbedderParameters()}

Then in my environment (I used gym environment), I have:

self.observation_space = spaces.Dict({
                'front_camera': spaces.Box(low=0, high=255,
                                        shape=(TRAINING_IMAGE_SIZE[1], TRAINING_IMAGE_SIZE[0], 3),
                                        dtype=np.uint8),
                'lidar': spaces.Box(low=0.1, high=10.0, shape=LIDAR_DIM)
        })

However, I got the error message like: ValueError: The key for the input embedder (front_camera) must match one of the following keys: dict_keys(['measurements', 'goal', 'observation', 'action'])

Are we only allowed to name them as 'observation' or 'measurements'? Thanks.

yunzhe-tao avatar Jul 16 '19 19:07 yunzhe-tao