deep learning for text and sequences training and evaluating the model compile and train the model listing training and evaluat ion model compile(optimizer='rmsprop'loss='binary_crossentropy'metrics=['acc']history model fit(x_trainy_trainepochs= batch_size= validation_data=(x_valy_val)model save_weights('pre_trained_glove_model 'nowplot the model' performance over time (see figures and listing plot ing he result import matplotlib pyplot as plt acc history history['acc'val_acc history history['val_acc'loss history history['loss'val_loss history history['val_loss'epochs range( len(acc plt plot(epochsacc'bo'label='training acc'plt plot(epochsval_acc' 'label='validation acc'plt title('training and validation accuracy'plt legend(plt figure(plt plot(epochsloss'bo'label='training loss'plt plot(epochsval_loss' 'label='validation loss'plt title('training and validation loss'plt legend(plt show(figure training and validat ion loss when using pretrained word embeddings licensed to