I designed a neural network in Torch for prediction of articles. I want to predict, which article will be read by user based on your reading history.
Input to the network is tf-idf vector of article and another information about user. Output from the network should be tf-idf vector of next article, which user read.
Tf-idf vector is normalized by SoftMax function.
I know the best solution would be, if a output was a representation of classes but there are a lot of articles and by that there will be a lot of classes. So I represent articles with tf-idf vector on the output.
I tried train with DistKLDivCriterion ( Kullback–Leibler divergence ) but it didn't converge. How to design a network for prediction tf-idf vectors? Which criterion should I use?
tmodel = nn.Sequential() tmodel:add(nn.Sequencer(nn.FastLSTM(537, 300, rho ))) tmodel:add(nn.Sequencer(nn.Dropout(0,5))) tmodel:add(nn.Sequencer(nn.Linear(300,527))) tmodel:add(nn.Sequencer(nn.LogSoftMax(527))) criterion = nn.SequencerCriterion(nn.DistKLDivCriterion())