-- input (seq_len, batch, input_size): tensor containing the features of the input sequence. The input can also be a packed variable length sequence. See torch.nn.utils.rnn.pack_padded_sequence() for details.
-- h_0 (num_layers * num_directions, batch, hidden_size): tensor containing the initial hidden state for each element in the batch.
Hi, Kimi
Thanks for your opening source the code.
I found the input of torch.nn.GRU (https://pytorch.org/docs/0.3.0/nn.html#torch.nn.GRU):
-- input (seq_len, batch, input_size): tensor containing the features of the input sequence. The input can also be a packed variable length sequence. See torch.nn.utils.rnn.pack_padded_sequence() for details. -- h_0 (num_layers * num_directions, batch, hidden_size): tensor containing the initial hidden state for each element in the batch.
But in EncoderRNN (https://github.com/hotpotqa/hotpot/blob/master/model.py)
The input size is (batch_size,seq_len,input_size), it doesn't seem to match the document for pytorch?
Deming Ye Best Wish