in [ ]batch_size model fit(train_xtrain_yepochs= batch_size=batch_sizeshuffle=truevalidation_split= verbose= train on samplesvalidate on samples epoch / / loss acc val_loss val_acc epoch / / loss acc val_loss val_acc epoch / / loss acc val_loss val_acc epoch / / loss acc val_loss val_acc epoch / / loss acc val_loss val_acc training lstms on cpu is notoriously slow and as you can see my model took approximately hours to train for just five epochs on an rd gen intel cpu with gb of memory of coursea cloud-based environment like google cloud platform or aws on gpu took me approximately less than an hour to train the same model so would recommend you choose gpu based deep learning environmentespecially when working with rnns or lstm based network architectures based on the preceding outputwe can see that just with five epochs we have decent validation accuracy but the training accuracy starts shooting up indicating some over-fitting might be happening ways to overcome this include adding more data or by increasing the drouput rate do give it shot and see if it workstime to put our model to the testlet' see how well it predicts the sentiment for our test reviews and use the same model evaluation framework we have used for our previous models (step in [ ]predict sentiments on test data pred_test model predict_classes(test_xpredictions le inverse_transform(pred_test flatten()evaluate model performance meu display_model_performance_metrics(true_labels=test_sentimentspredicted_labels=predictionsclasses=['positive''negative']figure - model performance metrics for lstm based deep learning model on word embeddings the results depicted in figure - show us that we have obtained model accuracy and -score of %which is quite goodwith more quality datayou can expect to get even better results try experimenting with different architectures and see if you get better results