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
From the course: Deep Learning with Python and Keras: Build a Model for Sentiment Analysis
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Feed forward neural networks4m 31s
-
(Locked)
Splitting data into training test and validation sets5m 3s
-
(Locked)
Representing text using count vectorization8m 32s
-
(Locked)
Configuring the dense neural network6m 11s
-
(Locked)
Training and evaluating the DNN3m 12s
-
(Locked)
Configuring the count vectorizer as a model layer2m 52s
-
(Locked)
Representing text using TF-IDF vectorization5m 9s
-
(Locked)
Training and evaluating the model3m 19s
-
(Locked)
Representing text using integer sequences3m 58s
-
(Locked)
Training a DNN using embeddings7m 21s
-
(Locked)
-
-