Luca96 / carla-driving-rl-agent

Code for the paper "Reinforced Curriculum Learning for Autonomous Driving in CARLA" (ICIP 2021)
MIT License
107 stars 25 forks source link

AttributeError: 'FakeCARLAEnvironment' object has no attribute 'time_horizon' #14

Closed adhocmaster closed 2 years ago

adhocmaster commented 2 years ago

Error running the first example:

E:\AV\carla-driving-rl-agent\core\networks.py in _get_input_layers(self, **kwargs)
    240 
    241         for name, shape in self.agent.state_spec.items():
--> 242             layer = Input(shape=(self.agent.env.time_horizon,) + shape, dtype=tf.float32, name=name)
    243             input_layers[name] = layer
    244 

AttributeError: 'FakeCARLAEnvironment' object has no attribute 'time_horizon'
adhocmaster commented 2 years ago

Next issue after fixing that:

E:\AV\carla-driving-rl-agent\core\networks.py in dynamics_layers(inputs, time_horizon, kwargs) 41 road_out = nn.feature_net(inputs['state_road'], time_horizon, kwargs.get('road', dict(normalization=None))) 42 vehicle_out = nn.feature_net(inputs['state_vehicle'], time_horizon, kwargs.get('vehicle', {}), ) ---> 43 navigation_out = nn.feature_net(inputs['state_navigation'], time_horizon, kwargs.get('navigation', {}), ) 44 45 # use RNNs to aggregate predictions over time:

KeyError: 'state_navigation'