I am building a text classifier using an RNN in PyTorch. The embeddings i'm using are GLOVE. However i am feeding variable length index references in to the model. This will lead to variable length embeddings, which i take it will not work. How do i get around this and make the embedding output the same length for all sentences?
def forward(self, sentence):
embeds = self.embedding(sentence)
hidden = self.__init__hidden(size)
output, hidden = self.rnn(embeds, hidden)
out = self.hidden2out(output)
Also, if someone could tell me how to choose the hidden layer size that would be great.