From the course: Deep Learning: Getting Started
Unlock this course with a free trial
Join today to access over 25,900 courses taught by industry experts.
Training and evaluation
From the course: Deep Learning: Getting Started
Training and evaluation
Now, we are ready to train our model. Training is where the model learns from the data through forward propagation, loss computation, backward propagation, and gradient descent. First set verbose to 1 so we can monitor detailed progress during the training. Then we need to define our hyperparameters. Batch size is set to 16, meaning the model will process 16 samples at a time before updating its weights. Epochs are set to 10, so the model will make 10 complete passes through the training data. Validation split is set to 0.2, meaning 20% of our training data will be held aside to validate the model after each epoch. First print a header and then call model.fit with our training data specifying all our hyperparameters. This single function call performs the entire training cycle. It feeds data forward through the network, calculates the loss, propagates errors backwards, and updates the weights using gradient descent. It repeats its process for a specified number of epochs. After the…
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.
