From the course: Deep Learning with Python and Keras: Build a Model for Sentiment Analysis

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Training and evaluating the DNN

Training and evaluating the DNN

- [Instructor] Now that we have our training validation and test dataset set up and our neural network configured, let's get started training, I call DNN_model.Fit as in the training dataset that is trained ds, we train for 10 epochs and the validation dataset we use to validate the model after each epoch of training,, because we are training our model using a GPU, you'll see that training runs through fairly quickly. It took just two or three minutes for the entire model to be trained. You can see that in the first epoch of training, the accuracy on the validation data, while accuracy was about 54.91%, but towards the end it went up to 66.24%. If you look at the last epoch though, training accuracy is at 78.34%, but validation accuracy is only at 66.24%. This should give you a clue that this model seems to be overfitting on the training data. We'll dig into this in just a bit, but before that, let's see how the model…

Contents