wayveai / mile

PyTorch code for the paper "Model-Based Imitation Learning for Urban Driving".
MIT License
330 stars 31 forks source link

The timestep when inference #45

Closed Oliverwang11 closed 1 month ago

Oliverwang11 commented 1 month ago

Hello,

first thanks for your contribution,

I have a confuse when I check the code for the batch you defined in mile.py

   """
    Parameters
    ----------
        batch: dict of torch.Tensor
            keys:
                image: (b, s, 3, h, w)
                route_map: (b, s, 3, h_r, w_r)
                speed: (b, s, 1)
                intrinsics: (b, s, 3, 3)
                extrinsics: (b, s, 4, 4)
                throttle_brake: (b, s, 1)
                steering: (b, s, 1)
    """

There is one parameter called s, what is that? I am guessing it is the timestep, T, in the paper right? So if it is how much is it in inference? I check during tanning it is 12.

Thanks!

Oliverwang11 commented 1 month ago

Hello anyone has insights?

anthonyhu commented 1 month ago

Yes s is the sequence length, or number of timesteps. During inference, since we have a recurrent model, we process each image one after the other (sequence length = 1) using the recurrent memory.

Oliverwang11 commented 1 month ago

Thanks a lot!