Hello everyone!
I’m trying to do the pytorch tutorials which start here:
http://pytorch.org/tutorials/beginner/nlp/pytorch_tutorial.html 64
Until now the examples given were quite simple. All models I encountered in the tutorial until reaching this page:
http://pytorch.org/tutorials/beginner/nlp/sequence_models_tutorial.html 41
took only one input and it was always a Variable containing a tensor.
But then I tried to do the exercise called “Augmenting the LSTM part-of-speech tagger with character-level features” presented on this page:
http://pytorch.org/tutorials/beginner/nlp/sequence_models_tutorial.html 41
and I realized that I needed three different inputs.
To put more context, the model takes one sentence of english at the time. I would like to have the following inputs

a list containing the length of the words of the sentence
a one dimensional LongTensor containing the indexes corresponding to the words of my sentence (I have a dictionary encoding all the words for the vocabulary into indexes).
a two dimensional LongTensor containing for each word the indexes corresponding to the letters of the word (with padding to have a vector of same length for every word).

For now the first argument is given as a Python list, and the two others as Variable containing torch.LongTensor. I know that I could also put my list in a LongTensor, but I would like to know if it is really required.
I suspect that I have to because I ran my model and I obtain the following error:
"forward() missing 1 required positional argument: ‘input’ "
and my forward method has been defined to take as second argument (after ‘self’), the list of length (and in particular no argument called ‘input’).