I’m trying to come up with a model for this Kaggle competition. Every training example is a sentence. For each of these sentences, I want to perform regression and produce a vector whose length is equal to the number of words in that sentence.
Following is an example:
Here, every row in the input column is a sentence so the sentence a u c
contains three words a
, u
and c
and the output corresponding to a
is [x11, x12]
and so on. Thus the output corresponding to the sentence a u c
is [[x11, x12], [x21, x22], x31, x32]]
| INPUT | OUTPUT |
|-----------|--------------------------------------------------------------|
| a u c | [[x11, x12], [x21, x22], x31, x32]] |
| g | [[x11, x12]] |
| a u c g a | [[x11, x12], [x21, x22], [x31, x32], [x41, x42], [x51, x52]] |
I’ve already trained a language model on Input and now I want to perform this regression.
Could someone please explain how can I do this in FastAI?