To create an LSTM model using Word2Vec embedding in MATLAB, follow the steps below:
word2vecReader
function.main.m62 chars2 lines
word2vecModel
object.main.m128 chars4 lines
Replace "word1", "word2", "word3", ... with your own list of words.
main.m116 chars4 lines
Replace "path/to/text/data.csv" with the path to your text data file.
wordEmbedding
function.main.m252 chars6 lines
main.m282 chars11 lines
Replace numHiddenUnits
and numClasses
with your desired values.
trainNetwork
function.main.m216 chars7 lines
Replace MaxEpochs
, MiniBatchSize
, and any other training options with your desired values.
main.m354 chars8 lines
Replace "path/to/test/data.csv" with the path to your test data file.
gistlibby LogSnag