RNN and sequence batch_first


I have a question about the “batch_first” parameter of both RNN and pack_padded_sequence.

Say I have a tensor AxBxC, where A = batch_size, B = seq_len.

I convert this tensor to a sequence with pack_padded_sequence(…, batch_first = True)

Now I input this converted sequence to an RNN, so the question is, if I need to set this RNN batch_first = True too?


Setting batch_first doesn’t affect the output of a RNN if the input is a sequence… just tried…