示例#1
0
    def create_model(cls, **kwargs) -> nn.Module:
        rgb_uuid = next(
            (s.uuid for s in cls.SENSORS if isinstance(s, RGBSensor)), None)
        depth_uuid = next(
            (s.uuid for s in cls.SENSORS if isinstance(s, DepthSensor)), None)
        goal_sensor_uuid = next(
            (s.uuid for s in cls.SENSORS
             if isinstance(s, (GPSCompassSensorRoboThor,
                               TargetCoordinatesSensorHabitat))),
            None,
        )

        return PointNavActorCriticSimpleConvRNN(
            action_space=gym.spaces.Discrete(
                len(PointNavTask.class_action_names())),
            observation_space=kwargs["sensor_preprocessor_graph"].
            observation_spaces,
            rgb_uuid=rgb_uuid,
            depth_uuid=depth_uuid,
            goal_sensor_uuid=goal_sensor_uuid,
            hidden_size=512,
            embed_coordinates=False,
            coordinate_dims=2,
            num_rnn_layers=1,
            rnn_type="GRU",
        )
示例#2
0
 def create_model(cls, **kwargs) -> nn.Module:
     return PointNavActorCriticSimpleConvRNN(
         action_space=gym.spaces.Discrete(
             len(PointNavTask.class_action_names())),
         observation_space=SensorSuite(cls.SENSORS  # type:ignore
                                       ).observation_spaces,
         goal_sensor_uuid=PointNavBaseConfig.TARGET_UUID,
     )
 def create_model(cls, **kwargs) -> nn.Module:
     return PointNavActorCriticSimpleConvRNN(
         action_space=gym.spaces.Discrete(len(PointNavTask.class_action_names())),
         observation_space=kwargs["observation_set"].observation_spaces,
         goal_sensor_uuid="target_coordinates_ind",
         hidden_size=512,
         embed_coordinates=False,
         coordinate_dims=2,
         num_rnn_layers=1,
         rnn_type="GRU",
     )