Adding Convolutions & Pooling
Check out a free preview of the full A Practical Guide to Machine Learning with TensorFlow 2.0 & Keras course
The "Adding Convolutions & Pooling" Lesson is part of the full, A Practical Guide to Machine Learning with TensorFlow 2.0 & Keras course featured in this preview video. Here's what you'd learn in this lesson:
Vadim demonstrates how to add multiple convolutional layers and how to add a callback function containing an accuracy rate. The accuracy rate is useful when when the correct number of epochs is unknown.
Transcript from the "Adding Convolutions & Pooling" Lesson
[00:00:00]
>> Let's modify our model a little bit, so after doing MaxPooling, we can simply connect. Or we can have multiple convolution layers if we want, but yeah, let's quickly go through this code example and see what we do in here. So once again, we're using TensorFlow importing our mnist data set from Keras.
[00:00:24]
Callback function, pretty useful if you want to do something during the training part. So for instance, when we used a model fit, I'll fix this error in a second. So I can specify callback and this function, in our case, myCallback function will be executed on every epoch_end. And it just simply comparing was the current accuracy of our training run.
[00:00:54]
And if it's, for instance, larger than 99% I can simply terminate my run. So if you don't know how many epochs you need to run your training, but you want to get to your particular accuracy, that's one of the way to do it. You just specify, okay, I just wanna get to 95% accuracy and then I'm done.
[00:01:14]
And this callback will terminate my fitting process as soon as we get to 95% accuracy.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops