l5kit.planning.vectorized.closed_loop_model module¶
- class l5kit.planning.vectorized.closed_loop_model.VectorizedUnrollModel(history_num_frames_ego: int, history_num_frames_agents: int, num_targets: int, weights_scaling: List[float], criterion: torch.nn.modules.module.Module, global_head_dropout: float, disable_other_agents: bool, disable_map: bool, disable_lane_boundaries: bool, detach_unroll: bool, warmup_num_frames: int, discount_factor: float, limit_predicted_yaw: bool = True)¶
Bases:
l5kit.planning.vectorized.open_loop_model.VectorizedModel
Vectorized closed-loop planning model.
- forward(data_batch: Dict[str, torch.Tensor]) Dict[str, torch.Tensor] ¶
Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool¶
- update_transformation_matrices(pred_xy_step_unnorm: torch.Tensor, pred_yaw_step: torch.Tensor, t0_from_ts: torch.Tensor, ts_from_t0: torch.Tensor, yaw_t0_from_ts: torch.Tensor, yaw_ts_from_t0: torch.Tensor, zero: torch.Tensor, one: torch.Tensor) Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor] ¶
Updates the used transformation matrices to reflect AoI’s new position.