Combining LSTM and MLP in Torch • /r/MachineLearning
I'm starting to tinker with Torch and I've come across some difficulties in figuring out how to combine layers with the'rnn' and'nn' libraries. I've spent a couple of days on this and I wasn't sure where else I could post to get some answers, but I apologize in advance is this isn't the appropriate place for Torch Questions (I've also posted on Stack Overflow). I have both text and non-text data, so I'd like to combine an LSTM layer (for the text data) and a hidden layer from an MLP (for the non-text data) into a larger MLP to predict my outcome. Here's where things go wrong, the last line fails, so my hack was to combine the predictions after piping it through the first two models, which is what I do below. I'm not sure where to go from here so any help from all you would be sincerely appreciated.
Oct-2-2016, 14:00:35 GMT