I’m going through the very useful tutorial by PyTorch 2 on Seq2Seq training.
Given that nn.GRU takes in input of shape (seq_len, batch, input_size), why does the encoder have N (seq_len) number of timesteps during training?
    for ei in range(input_length):
        encoder_output, encoder_hidden = encoder(
            input_tensor[ei], encoder_hidden)
        encoder_outputs[ei] = encoder_output[0, 0]

From the docs GRU can take in a batch input of the above shape, shouldn’t it work without a N timesteps?
encoder_output, encoder_hidden = encoder(
            input_tensor)

Doesn’t calling GRU(input) take care of all the timesteps? If it was one just GRU cell (nn.GRUCell) then I can sort of undertsand why the above method is used, but it’s using a GRU layer instead