Train LSTM model using keras on the given dataset
data | the sentiment140 train dataset with |
---|---|
max_words | Maximum number of words to consider using word frequency measure. |
maxlen | Maximum length of a sequence. |
embedding_dim | Output dimension of the embedding layer. |
epochs | Number of epochs to run the training for. |
batch_size | Batch Size for model fitting. |
validation_split | Split ratio for validation |
lstm_units | Number of units i.e. output dimension of lstm layer. |
seed | Seed for shuffling training data. |
model_save_path | File path location for saving model. |
plot of the training operation showing train vs validation loss and accuracy.
# NOT RUN { data(sentiment140_train) train_lstm(model_save_path = "./train_no_glove_lstm.h5") # }