title
Keras with TensorFlow Course - Python Deep Learning and Neural Networks for Beginners Tutorial

description
This course will teach you how to use Keras, a neural network API written in Python and integrated with TensorFlow. We will learn how to prepare and process data for artificial neural networks, build and train artificial neural networks from scratch, build and train convolutional neural networks (CNNs), implement fine-tuning and transfer learning, and more! ⭐️🦎 COURSE CONTENTS 🦎⭐️ ⌨️ (00:00:00) Welcome to this course ⌨️ (00:00:16) Keras Course Introduction ⌨️ (00:00:50) Course Prerequisites ⌨️ (00:01:33) DEEPLIZARD Deep Learning Path ⌨️ (00:01:45) Course Resources ⌨️ (00:02:30) About Keras ⌨️ (00:06:41) Keras with TensorFlow - Data Processing for Neural Network Training ⌨️ (00:18:39) Create an Artificial Neural Network with TensorFlow's Keras API ⌨️ (00:24:36) Train an Artificial Neural Network with TensorFlow's Keras API ⌨️ (00:30:07) Build a Validation Set With TensorFlow's Keras API ⌨️ (00:39:28) Neural Network Predictions with TensorFlow's Keras API ⌨️ (00:47:48) Create a Confusion Matrix for Neural Network Predictions ⌨️ (00:52:29) Save and Load a Model with TensorFlow's Keras API ⌨️ (01:01:25) Image Preparation for CNNs with TensorFlow's Keras API ⌨️ (01:19:22) Build and Train a CNN with TensorFlow's Keras API ⌨️ (01:28:42) CNN Predictions with TensorFlow's Keras API ⌨️ (01:37:05) Build a Fine-Tuned Neural Network with TensorFlow's Keras API ⌨️ (01:48:19) Train a Fine-Tuned Neural Network with TensorFlow's Keras API ⌨️ (01:52:39) Predict with a Fine-Tuned Neural Network with TensorFlow's Keras API ⌨️ (01:57:50) MobileNet Image Classification with TensorFlow's Keras API ⌨️ (02:11:18) Process Images for Fine-Tuned MobileNet with TensorFlow's Keras API ⌨️ (02:24:24) Fine-Tuning MobileNet on Custom Data Set with TensorFlow's Keras API ⌨️ (02:38:59) Data Augmentation with TensorFlow' Keras API ⌨️ (02:47:24) Collective Intelligence and the DEEPLIZARD HIVEMIND ⭐️🦎 DEEPLIZARD COMMUNITY RESOURCES 🦎⭐️ 👉 Check out the blog post and other resources for this course: 🔗 https://deeplizard.com/learn/video/RznKVRTFkBY 💻 DOWNLOAD ACCESS TO CODE FILES 🤖 Available for members of the deeplizard hivemind: 🔗 https://deeplizard.com/resources 🧠 Support collective intelligence, join the deeplizard hivemind: 🔗 https://deeplizard.com/hivemind 👋 Hey, we're Chris and Mandy, the creators of deeplizard! 👀 CHECK OUT OUR VLOG: 🔗 https://youtube.com/deeplizardvlog 👀 Follow deeplizard: YouTube: https://youtube.com/deeplizard Our vlog: https://youtube.com/deeplizardvlog Facebook: https://facebook.com/deeplizard Instagram: https://instagram.com/deeplizard Twitter: https://twitter.com/deeplizard Patreon: https://patreon.com/deeplizard 🎵 deeplizard uses music by Kevin MacLeod 🔗 https://youtube.com/channel/UCSZXFhRIx6b0dFX3xS8L1yQ 🔗 http://incompetech.com/ ❤️ Please use the knowledge gained from deeplizard content for good, not evil. -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news

detail
{'title': 'Keras with TensorFlow Course - Python Deep Learning and Neural Networks for Beginners Tutorial', 'heatmap': [{'end': 1210.988, 'start': 901.154, 'weight': 0.717}, {'end': 1713.932, 'start': 1508.162, 'weight': 0.823}, {'end': 3028.725, 'start': 2917.566, 'weight': 1}, {'end': 4539.191, 'start': 4430.26, 'weight': 0.907}], 'summary': 'A keras with tensorflow course covers data preprocessing, neural network training, and model inference achieving 94% accuracy; fine-tuning vgg16 model for cat and dog classification with 99% training accuracy and 98% validation accuracy; and discusses mobilenets, achieving 100% accuracy on training set and 92% on validation set after 30 epochs.', 'chapters': [{'end': 403.991, 'segs': [{'end': 45.047, 'src': 'embed', 'start': 0.229, 'weight': 0, 'content': [{'end': 1.751, 'text': "Hey, I'm Mandy from Deep Blizzard.", 'start': 0.229, 'duration': 1.522}, {'end': 10.059, 'text': "And in this course, we're going to learn how to use Keras, a neural network API written in Python and integrated with TensorFlow.", 'start': 2.151, 'duration': 7.908}, {'end': 25.512, 'text': 'Throughout the course, each lesson will focus on a specific deep learning concept and show the full implementation in code using the Keras API.', 'start': 16.886, 'duration': 8.626}, {'end': 30.416, 'text': "We'll be starting with the absolute basics of learning how to organize and pre process data.", 'start': 25.953, 'duration': 4.463}, {'end': 35.18, 'text': "And then we'll move on to building and training our own artificial neural networks.", 'start': 30.936, 'duration': 4.244}, {'end': 45.047, 'text': "And some of these networks will be built from scratch and others will be pre trained state of the art models for which we'll fine tune to use on our own custom data sets.", 'start': 35.6, 'duration': 9.447}], 'summary': 'Learn keras for deep learning with python and tensorflow, covering data organization, network building, and fine-tuning pre-trained models.', 'duration': 44.818, 'max_score': 0.229, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI229.jpg'}, {'end': 110.037, 'src': 'embed', 'start': 84.534, 'weight': 2, 'content': [{'end': 90.92, 'text': "In regard to coding prerequisites, just some basic programming skills and some Python experience are all that's needed.", 'start': 84.534, 'duration': 6.386}, {'end': 94.864, 'text': 'On deeplizard.com, you can also find the deep learning learning path.', 'start': 91.621, 'duration': 3.243}, {'end': 99.869, 'text': 'So you can see where this Keras course falls amidst all the deep lizard deep learning content.', 'start': 95.144, 'duration': 4.725}, {'end': 102.294, 'text': "Now let's discuss the course resources.", 'start': 100.433, 'duration': 1.861}, {'end': 110.037, 'text': 'So aside from the videos here on YouTube, you will also have video and text resources available on dblizzard.com.', 'start': 102.934, 'duration': 7.103}], 'summary': 'Python and basic programming skills are needed for the keras course on deeplizard.com. course resources include videos and text available on dblizzard.com.', 'duration': 25.503, 'max_score': 84.534, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI84534.jpg'}, {'end': 161.401, 'src': 'embed', 'start': 124.503, 'weight': 3, 'content': [{'end': 132.589, 'text': 'Additionally, all of the code resources used in this course are regularly tested and maintained, including updates and bug fixes when needed.', 'start': 124.503, 'duration': 8.086}, {'end': 138.253, 'text': 'Download access to code files used in this course are available to members of the Deep Blizzard hive mind.', 'start': 133.089, 'duration': 5.164}, {'end': 141.596, 'text': 'So you can check out more about that on deepblizzard.com as well.', 'start': 138.553, 'duration': 3.043}, {'end': 149.198, 'text': 'Alright. so now that we know what this course is about and what resources we have available, along with the prerequisites needed to get started,', 'start': 142.176, 'duration': 7.022}, {'end': 152.019, 'text': "let's now talk a little bit more about Keras itself.", 'start': 149.198, 'duration': 2.821}, {'end': 156.6, 'text': 'Keras was developed with a focus on enabling fast user experimentation.', 'start': 152.479, 'duration': 4.121}, {'end': 161.401, 'text': 'So this allows us to go from idea to implementation in very few steps.', 'start': 157.12, 'duration': 4.281}], 'summary': 'Keras enables fast user experimentation and streamlines idea implementation.', 'duration': 36.898, 'max_score': 124.503, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI124503.jpg'}, {'end': 218.309, 'src': 'embed', 'start': 198.591, 'weight': 5, 'content': [{'end': 214.245, 'text': "knowing more than one neural network API will show your experience and allow you to compare and contrast the differences between API's and share your opinions for why you think that certain API's may be better for certain problems and others for other problems.", 'start': 198.591, 'duration': 15.654}, {'end': 218.309, 'text': 'Being able to demonstrate this will make you a much more valuable candidate.', 'start': 214.806, 'duration': 3.503}], 'summary': 'Knowledge of multiple neural network apis demonstrates expertise and enables comparison and contrast, making candidates more valuable.', 'duration': 19.718, 'max_score': 198.591, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI198591.jpg'}, {'end': 293.582, 'src': 'embed', 'start': 265.012, 'weight': 6, 'content': [{'end': 269.174, 'text': 'without necessarily making much use of the lower level TensorFlow API.', 'start': 265.012, 'duration': 4.162}, {'end': 276.697, 'text': 'Now before we can start working with Keras, then we first have to obviously get it downloaded and installed onto our machines.', 'start': 269.634, 'duration': 7.063}, {'end': 282.8, 'text': 'And because Keras is fully integrated with TensorFlow, we can do that by just installing TensorFlow.', 'start': 277.319, 'duration': 5.481}, {'end': 286.461, 'text': 'Keras will come completely packaged with the TensorFlow installation.', 'start': 283.14, 'duration': 3.321}, {'end': 293.582, 'text': 'So the installation procedure is as simple as running pip install TensorFlow from your command line.', 'start': 287.121, 'duration': 6.461}], 'summary': "Keras is integrated with tensorflow, making installation simple with 'pip install tensorflow'.", 'duration': 28.57, 'max_score': 265.012, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI265012.jpg'}, {'end': 375.165, 'src': 'embed', 'start': 344.214, 'weight': 7, 'content': [{'end': 349.315, 'text': "But actually, I recommend just going through the course with a CPU if you're not already set up with a GPU.", 'start': 344.214, 'duration': 5.101}, {'end': 355.576, 'text': 'And like I said, the all the code will work completely fine, run totally fine using only a CPU.', 'start': 349.915, 'duration': 5.661}, {'end': 363.357, 'text': 'But then after the fact after you go through the course successfully, then get the steps in order to work with the GPU if you have one.', 'start': 355.996, 'duration': 7.361}, {'end': 368.56, 'text': 'and then run all the code that you have in place from earlier, run it on the GPU,', 'start': 363.817, 'duration': 4.743}, {'end': 375.165, 'text': "the second go round and just kind of look and see the kind of efficiency and speed ups that you'll see in the code.", 'start': 368.56, 'duration': 6.605}], 'summary': 'Start with cpu, then switch to gpu for efficiency and speed ups.', 'duration': 30.951, 'max_score': 344.214, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI344214.jpg'}], 'start': 0.229, 'title': 'Introduction to keras and tensorflow', 'summary': 'Introduces a keras course by deep blizzard, focusing on using keras, a neural network api integrated with tensorflow. it covers topics on data preprocessing, building and training neural networks, and prerequisites for the course. additionally, it provides an overview of keras and tensorflow, emphasizing the benefits of keras for fast user experimentation, the importance of learning multiple neural network apis for job prospects, and the simplicity of installing keras through tensorflow. it also touches upon gpu support and advises starting with a cpu before considering a gpu setup.', 'chapters': [{'end': 141.596, 'start': 0.229, 'title': 'Keras basics for deep learning', 'summary': 'Introduces a keras course by deep blizzard focusing on using keras, a neural network api integrated with tensorflow, covering topics on data preprocessing, building and training neural networks, and prerequisites for the course.', 'duration': 141.367, 'highlights': ['The course will cover specific deep learning concepts and show the full implementation in code using the Keras API, integrating with TensorFlow. The course focuses on specific deep learning concepts and their implementation using the Keras API integrated with TensorFlow.', 'The initial lessons will cover organizing and preprocessing data, followed by building and training artificial neural networks, including both scratch-built and pre-trained models to be fine-tuned for custom data sets. The course starts with organizing and preprocessing data, then progresses to building and training artificial neural networks, including both scratch-built and pre-trained models for fine-tuning.', 'Prerequisites include basic programming skills and some Python experience, with recommended additional learning from the Deep Learning Fundamentals course on deeplizard.com. Prerequisites include basic programming skills and some Python experience, with additional recommended learning from the Deep Learning Fundamentals course on deeplizard.com.', 'Course resources include video and text materials available on dblizzard.com, corresponding blogs and quizzes for each episode, and regularly tested and maintained code resources accessible to Deep Blizzard members. Course resources include video and text materials, corresponding blogs and quizzes, and regularly tested and maintained code resources for Deep Blizzard members.']}, {'end': 403.991, 'start': 142.176, 'title': 'Introduction to keras and tensorflow', 'summary': 'Provides an overview of keras and tensorflow, emphasizing the benefits of keras for fast user experimentation, the importance of learning multiple neural network apis for job prospects, and the simplicity of installing keras through tensorflow. additionally, it touches upon gpu support and advises starting with a cpu before considering a gpu setup.', 'duration': 261.815, 'highlights': ['Keras enables fast user experimentation, allowing quick transition from idea to implementation in few steps. Keras was developed with a focus on enabling fast user experimentation, allowing quick transition from idea to implementation in very few steps.', "It's recommended to learn multiple neural network APIs to demonstrate experience and enhance job prospects. The recommendation is to learn multiple neural network APIs to demonstrate experience and enhance job prospects.", 'Keras is now fully integrated with the TensorFlow API, simplifying the installation process by packaging Keras with TensorFlow. Keras is now completely integrated with the TensorFlow API, simplifying the installation process by packaging Keras with TensorFlow.', 'GPU support is optional, with the option to set it up after going through the course using a CPU, allowing comparison of efficiency and speed-ups. GPU support is optional, with the option to set it up after going through the course using a CPU, allowing comparison of efficiency and speed-ups.']}], 'duration': 403.762, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI229.jpg', 'highlights': ['The course focuses on specific deep learning concepts and their implementation using the Keras API integrated with TensorFlow.', 'The initial lessons cover organizing and preprocessing data, followed by building and training artificial neural networks, including both scratch-built and pre-trained models for fine-tuning.', 'Prerequisites include basic programming skills and some Python experience, with additional recommended learning from the Deep Learning Fundamentals course on deeplizard.com.', 'Course resources include video and text materials, corresponding blogs and quizzes, and regularly tested and maintained code resources for Deep Blizzard members.', 'Keras was developed with a focus on enabling fast user experimentation, allowing quick transition from idea to implementation in very few steps.', 'The recommendation is to learn multiple neural network APIs to demonstrate experience and enhance job prospects.', 'Keras is now completely integrated with the TensorFlow API, simplifying the installation process by packaging Keras with TensorFlow.', 'GPU support is optional, with the option to set it up after going through the course using a CPU, allowing comparison of efficiency and speed-ups.']}, {'end': 1084.684, 'segs': [{'end': 457.36, 'src': 'embed', 'start': 404.511, 'weight': 1, 'content': [{'end': 413.216, 'text': "In this episode, we'll learn how to prepare and process numerical data that will later use to train our very first artificial neural network.", 'start': 404.511, 'duration': 8.705}, {'end': 428.857, 'text': 'To train any neural network in a supervised learning task, we first need a data set of samples along with the corresponding labels for those samples.', 'start': 419.827, 'duration': 9.03}, {'end': 434.323, 'text': "When referring to the word samples, we're simply just talking about the underlying data set,", 'start': 429.337, 'duration': 4.986}, {'end': 438.087, 'text': 'where each data point in the set is referred to as a sample.', 'start': 434.323, 'duration': 3.764}, {'end': 444.895, 'text': 'If we were to train a model to do sentiment analysis on headlines from a media source, for example,', 'start': 438.792, 'duration': 6.103}, {'end': 451.117, 'text': 'then the labels that correspond to each headline sample would be positive or negative.', 'start': 444.895, 'duration': 6.222}, {'end': 457.36, 'text': 'Or say that we were training an artificial neural network to identify images as cats or dogs.', 'start': 451.978, 'duration': 5.382}], 'summary': 'Learn to process numerical data for training artificial neural networks.', 'duration': 52.849, 'max_score': 404.511, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI404511.jpg'}, {'end': 642.275, 'src': 'embed', 'start': 598.382, 'weight': 0, 'content': [{'end': 604.266, 'text': 'and then have why our target data or our labels for those samples in a TensorFlow tensor.', 'start': 598.382, 'duration': 5.884}, {'end': 607.969, 'text': 'So the format of x and y both need to match.', 'start': 604.846, 'duration': 3.123}, {'end': 612.212, 'text': "And we're going to be putting both of those into NumPy arrays.", 'start': 608.449, 'duration': 3.763}, {'end': 615.69, 'text': 'Alright, so now we know the data format that the model expects.', 'start': 612.728, 'duration': 2.962}, {'end': 620.152, 'text': "But there's another reason that we may want to transform or process our data.", 'start': 616.25, 'duration': 3.902}, {'end': 625.975, 'text': 'And that is to put it in a format that will make it easier or more efficient for the model to learn from.', 'start': 620.392, 'duration': 5.583}, {'end': 630.417, 'text': 'And we can do that with data normalization or standardization techniques.', 'start': 626.435, 'duration': 3.982}, {'end': 636.474, 'text': "data processing and deep learning will vary greatly depending on the type of data that we're working with.", 'start': 630.993, 'duration': 5.481}, {'end': 642.275, 'text': 'So to start out, we are going to work with a very simple numerical data set to train our model.', 'start': 637.054, 'duration': 5.221}], 'summary': 'In deep learning, data processing is crucial for efficient learning. using numpy arrays and normalization techniques, the model can be trained with simple numerical data.', 'duration': 43.893, 'max_score': 598.382, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI598382.jpg'}, {'end': 725.447, 'src': 'embed', 'start': 698.996, 'weight': 3, 'content': [{'end': 707.224, 'text': 'So as a motivation for this kind of dummy data, we have this background story to give us an idea of what this data is all about.', 'start': 698.996, 'duration': 8.228}, {'end': 716.133, 'text': "So let's suppose that an experimental drug was tested on individuals ranging from age 13 to 100 in a clinical trial.", 'start': 707.825, 'duration': 8.308}, {'end': 719.136, 'text': 'And this trial had 2100 participants total.', 'start': 716.153, 'duration': 2.983}, {'end': 723.246, 'text': 'Half of these participants were under the age of 65.', 'start': 719.676, 'duration': 3.57}, {'end': 725.447, 'text': 'and half were 65 years or older.', 'start': 723.246, 'duration': 2.201}], 'summary': 'Clinical trial involved 2100 participants, half under 65 and half 65 or older.', 'duration': 26.451, 'max_score': 698.996, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI698996.jpg'}], 'start': 404.511, 'title': 'Preparing and generating data', 'summary': 'Covers preparing numerical data for neural network training, including data types and labels, data format, and normalization techniques, and generating a synthetic dataset for an experimental drug trial with 2100 participants, highlighting the side effects in different age groups and data transformation using python and numpy arrays.', 'chapters': [{'end': 698.209, 'start': 404.511, 'title': 'Preparing numerical data for neural network', 'summary': 'Explains the process of preparing and processing numerical data to train an artificial neural network, including the types of data and labels needed, the data format expected by the model, and the use of data normalization techniques.', 'duration': 293.698, 'highlights': ['The chapter emphasizes the need for a data set of samples and corresponding labels for training a supervised learning neural network, with examples of samples being headlines for sentiment analysis or images for categorization. Supervised learning neural network requires a data set of samples and corresponding labels; examples include sentiment analysis on headlines or categorizing images.', 'The chapter explains the expected format of input data (x) and target data (y) for the fit function in the Keras API, emphasizing the use of NumPy arrays for organizing input samples and corresponding labels. The fit function in the Keras API expects input data (x) in NumPy array format and corresponding labels (y) in the same format for training the model.', 'The chapter highlights the importance of transforming and processing data to make it easier and more efficient for the model to learn from, including the use of data normalization or standardization techniques. Data processing and deep learning can be made more efficient through techniques such as data normalization or standardization.']}, {'end': 1084.684, 'start': 698.996, 'title': 'Generating experimental drug data', 'summary': 'Demonstrates the process of creating a synthetic dataset for an experimental drug trial, with 2100 participants, where 95% of older patients experienced side effects while 95% of younger patients did not, and then transforming and processing the data using python and numpy arrays to prepare it for neural network training.', 'duration': 385.688, 'highlights': ['Creating a synthetic dataset for an experimental drug trial with 2100 participants The transcript details the process of creating a synthetic dataset for an experimental drug trial with 2100 participants, where 95% of older patients experienced side effects while 95% of younger patients did not.', 'Transforming and processing the data using Python and NumPy arrays The process of transforming and processing the data using Python and NumPy arrays to prepare it for neural network training is outlined in the transcript.']}], 'duration': 680.173, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI404511.jpg', 'highlights': ['The fit function in the Keras API expects input data (x) in NumPy array format and corresponding labels (y) in the same format for training the model.', 'The chapter emphasizes the need for a data set of samples and corresponding labels for training a supervised learning neural network, with examples of samples being headlines for sentiment analysis or images for categorization.', 'Data processing and deep learning can be made more efficient through techniques such as data normalization or standardization.', 'Creating a synthetic dataset for an experimental drug trial with 2100 participants where 95% of older patients experienced side effects while 95% of younger patients did not.', 'The process of transforming and processing the data using Python and NumPy arrays to prepare it for neural network training is outlined in the transcript.']}, {'end': 2372.474, 'segs': [{'end': 1108.674, 'src': 'embed', 'start': 1085.174, 'weight': 7, 'content': [{'end': 1095.363, 'text': 'and then processed it to be in a NumPy array format that our model will expect, and then rescale the data to be on a scale between zero and one.', 'start': 1085.174, 'duration': 10.189}, {'end': 1100.707, 'text': "In an upcoming episode, we'll use this data to train our first artificial neural network.", 'start': 1095.883, 'duration': 4.824}, {'end': 1108.674, 'text': 'Be sure to check out the blog and other resources available for this episode on deep lizard.com, as well as the deep lizard hive mind,', 'start': 1101.207, 'duration': 7.467}], 'summary': 'Data processed into numpy array and rescaled for neural network training.', 'duration': 23.5, 'max_score': 1085.174, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1085174.jpg'}, {'end': 1167.275, 'src': 'embed', 'start': 1139.602, 'weight': 8, 'content': [{'end': 1143.785, 'text': 'In the last episode, we generated data from an imagined clinical trial.', 'start': 1139.602, 'duration': 4.183}, {'end': 1149.308, 'text': "And now we'll create an artificial neural network for which we can train on this data.", 'start': 1144.445, 'duration': 4.863}, {'end': 1156.914, 'text': "Alright, so first things first, we need to import all of the TensorFlow modules that we'll be making use of to build our first model.", 'start': 1149.829, 'duration': 7.085}, {'end': 1164.599, 'text': 'And that includes everything that you see here except for actually the last two of Adam and categorical cross infantry.', 'start': 1157.554, 'duration': 7.045}, {'end': 1167.275, 'text': 'categorical cross entropy.', 'start': 1165.734, 'duration': 1.541}], 'summary': 'Creating a neural network for a clinical trial data with tensorflow modules.', 'duration': 27.673, 'max_score': 1139.602, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1139602.jpg'}, {'end': 1230.648, 'src': 'embed', 'start': 1205.184, 'weight': 9, 'content': [{'end': 1210.988, 'text': 'And that is kind of the most simplest type of model that you can build using Keras or TensorFlow.', 'start': 1205.184, 'duration': 5.804}, {'end': 1215.231, 'text': 'And a sequential model can be described as a linear stack of layers.', 'start': 1211.268, 'duration': 3.963}, {'end': 1219.794, 'text': "So if you look at how we're creating the model here, that's exactly what it looks like.", 'start': 1215.671, 'duration': 4.123}, {'end': 1225.378, 'text': 'So we are initializing the model as an instance of the sequential class.', 'start': 1220.274, 'duration': 5.104}, {'end': 1230.648, 'text': 'And we are passing in a list of layers here.', 'start': 1226.244, 'duration': 4.404}], 'summary': 'Introduction to building a simple sequential model using keras or tensorflow.', 'duration': 25.464, 'max_score': 1205.184, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1205184.jpg'}, {'end': 1323.711, 'src': 'embed', 'start': 1280.481, 'weight': 3, 'content': [{'end': 1285.246, 'text': 'Now we are telling this dense layer that we want it to have 16 units.', 'start': 1280.481, 'duration': 4.765}, {'end': 1289.572, 'text': 'These units are also otherwise known as nodes or neurons.', 'start': 1285.927, 'duration': 3.645}, {'end': 1293.393, 'text': 'And the choice of 16 here is actually pretty arbitrary.', 'start': 1290.092, 'duration': 3.301}, {'end': 1296.274, 'text': 'This model overall is very simple.', 'start': 1293.893, 'duration': 2.381}, {'end': 1303.876, 'text': "And with the arbitrary choice of nodes here it's actually going to be pretty hard to create a simple model.", 'start': 1296.534, 'duration': 7.342}, {'end': 1311.438, 'text': "at least that won't do a good job at classifying this data, just given the simplicity of the data itself.", 'start': 1303.876, 'duration': 7.562}, {'end': 1317.644, 'text': "So we understand that we're passing in or that we're specifying 16 units for this first hidden layer.", 'start': 1311.997, 'duration': 5.647}, {'end': 1323.711, 'text': 'we are specifying the input shape so that the model knows the shape of the input data to expect.', 'start': 1317.644, 'duration': 6.067}], 'summary': 'A simple model with 16 units in the first hidden layer, but may struggle to classify complex data.', 'duration': 43.23, 'max_score': 1280.481, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1280481.jpg'}, {'end': 1395.383, 'src': 'embed', 'start': 1371.309, 'weight': 2, 'content': [{'end': 1380.194, 'text': "And we're following this output layer with the softmax function, which is just going to give us probabilities for each output class.", 'start': 1371.309, 'duration': 8.885}, {'end': 1389.379, 'text': 'So, between whether or not a patient experience side effects or not, we will have an output probability for each class,', 'start': 1381.535, 'duration': 7.844}, {'end': 1393.282, 'text': 'letting us know which class is more probable for any given patient.', 'start': 1389.379, 'duration': 3.903}, {'end': 1395.383, 'text': "And just in case it's not clear.", 'start': 1393.822, 'duration': 1.561}], 'summary': 'Using softmax function to determine probabilities for each output class in patient side effects prediction.', 'duration': 24.074, 'max_score': 1371.309, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1371309.jpg'}, {'end': 1713.932, 'src': 'heatmap', 'start': 1508.162, 'weight': 0.823, 'content': [{'end': 1516.568, 'text': 'Alright. so, picking up where we were last time in our Jupyter Notebook, make sure that you still have all of your imports included and already ran,', 'start': 1508.162, 'duration': 8.406}, {'end': 1518.95, 'text': 'so that we can continue where we were before.', 'start': 1516.568, 'duration': 2.382}, {'end': 1525.349, 'text': 'So first we have after building our model, we are going to call this model dot compile function.', 'start': 1519.608, 'duration': 5.741}, {'end': 1528.53, 'text': 'And this just prepares the model for training.', 'start': 1525.789, 'duration': 2.741}, {'end': 1532.111, 'text': "So it gets everything in order that's needed before we can actually train the model.", 'start': 1528.57, 'duration': 3.541}, {'end': 1538.092, 'text': 'So first we are specifying to the compile function what optimizer that we want to use.', 'start': 1532.711, 'duration': 5.381}, {'end': 1540.813, 'text': 'And we are choosing to use the very common optimizer.', 'start': 1538.312, 'duration': 2.501}, {'end': 1543.619, 'text': 'atom with a learning rate of 0.0001.', 'start': 1541.477, 'duration': 2.142}, {'end': 1553.926, 'text': "And next we specify the type of loss that we need to use, which is in our case, we're going to use sparse categorical cross.", 'start': 1543.619, 'duration': 10.307}, {'end': 1557.929, 'text': "We're going to use sparse categorical cross entropy.", 'start': 1555.447, 'duration': 2.482}, {'end': 1561.472, 'text': 'And then lastly, we specify what metrics we want to see.', 'start': 1558.249, 'duration': 3.223}, {'end': 1569.738, 'text': 'So this is just for the model performance, what we want to be able to judge our model by, and we are specifying this list,', 'start': 1561.552, 'duration': 8.186}, {'end': 1576.048, 'text': 'which just includes accuracy, which is a very common way to be able to evaluate model performance.', 'start': 1570.086, 'duration': 5.962}, {'end': 1581.909, 'text': 'So if we run this cell, alright, so the model has been compiled and is ready for training.', 'start': 1576.648, 'duration': 5.261}, {'end': 1585.85, 'text': 'And training occurs whenever we call this fit function.', 'start': 1582.429, 'duration': 3.421}, {'end': 1593.452, 'text': 'Now recall earlier in the course, we actually looked at the documentation for this fit function, so that we knew how to process our input data.', 'start': 1586.41, 'duration': 7.042}, {'end': 1599.314, 'text': "So to fit the first parameter that we're specifying is x here, which is our input data.", 'start': 1593.973, 'duration': 5.341}, {'end': 1604.861, 'text': 'which is currently stored in this scale to train samples variable, then why?', 'start': 1599.738, 'duration': 5.123}, {'end': 1608.443, 'text': 'which is our target data or our labels?', 'start': 1604.861, 'duration': 3.582}, {'end': 1612.245, 'text': 'our labels are currently stored in the train labels variable.', 'start': 1608.443, 'duration': 3.802}, {'end': 1614.407, 'text': 'So we are specifying that here.', 'start': 1612.285, 'duration': 2.122}, {'end': 1617.929, 'text': 'Next, we specify our batch size that we want to use for training.', 'start': 1615.007, 'duration': 2.922}, {'end': 1625.153, 'text': 'So this is how many samples are included in one batch to be passed and processed by the network at one time.', 'start': 1618.329, 'duration': 6.824}, {'end': 1626.986, 'text': "So we're setting this to 10.", 'start': 1625.526, 'duration': 1.46}, {'end': 1631.207, 'text': "And the number of epochs that we want to run, we're setting this to 30.", 'start': 1626.986, 'duration': 4.221}, {'end': 1642.691, 'text': 'So that means that the model is going to process or train on all of the data in the data set 30 times before completing the total training process.', 'start': 1631.207, 'duration': 11.484}, {'end': 1648.872, 'text': "Next, we're specifying this shuffle or shuffle parameter, which we are setting to true.", 'start': 1643.051, 'duration': 5.821}, {'end': 1652.113, 'text': 'Now by default, this is already set to true.', 'start': 1649.252, 'duration': 2.861}, {'end': 1662.213, 'text': 'But I was just bringing it to your attention to show or to make you aware of the fact that the data is being shuffled by default when we pass it to the network,', 'start': 1652.486, 'duration': 9.727}, {'end': 1672.46, 'text': 'which is a good thing, because we want any order that is inside of the data set to be kind of erased before we pass the data to the model,', 'start': 1662.213, 'duration': 10.247}, {'end': 1676.843, 'text': 'so that the model is not necessarily learning anything about the order of the data set.', 'start': 1672.46, 'duration': 4.383}, {'end': 1678.451, 'text': 'So this is true by default.', 'start': 1677.27, 'duration': 1.181}, {'end': 1680.693, 'text': "So we don't necessarily have to specify that.", 'start': 1678.691, 'duration': 2.002}, {'end': 1688.098, 'text': "I was just letting you know and actually we'll see something about that in the next episode about why this is important.", 'start': 1680.693, 'duration': 7.405}, {'end': 1689.519, 'text': 'regarding validation data', 'start': 1688.098, 'duration': 1.421}, {'end': 1690.76, 'text': "But we'll see that coming up.", 'start': 1689.86, 'duration': 0.9}, {'end': 1699.827, 'text': 'The last parameter that we specify here is verbose, which is just an option to allow us to see output from whenever we run this fit function.', 'start': 1691.281, 'duration': 8.546}, {'end': 1706.192, 'text': 'So we can either set it to 01 or two, two is the most verbose level in terms of output messages.', 'start': 1699.907, 'duration': 6.285}, {'end': 1710.566, 'text': 'setting that here so that we can get the highest level of output.', 'start': 1707.441, 'duration': 3.125}, {'end': 1713.932, 'text': "So now let's run the cell so that training can begin.", 'start': 1711.167, 'duration': 2.765}], 'summary': 'Model compiled with optimizer atom, learning rate 0.0001, sparse categorical cross entropy loss, batch size 10, and 30 epochs for training.', 'duration': 205.77, 'max_score': 1508.162, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1508162.jpg'}, {'end': 1569.738, 'src': 'embed', 'start': 1538.312, 'weight': 4, 'content': [{'end': 1540.813, 'text': 'And we are choosing to use the very common optimizer.', 'start': 1538.312, 'duration': 2.501}, {'end': 1543.619, 'text': 'atom with a learning rate of 0.0001.', 'start': 1541.477, 'duration': 2.142}, {'end': 1553.926, 'text': "And next we specify the type of loss that we need to use, which is in our case, we're going to use sparse categorical cross.", 'start': 1543.619, 'duration': 10.307}, {'end': 1557.929, 'text': "We're going to use sparse categorical cross entropy.", 'start': 1555.447, 'duration': 2.482}, {'end': 1561.472, 'text': 'And then lastly, we specify what metrics we want to see.', 'start': 1558.249, 'duration': 3.223}, {'end': 1569.738, 'text': 'So this is just for the model performance, what we want to be able to judge our model by, and we are specifying this list,', 'start': 1561.552, 'duration': 8.186}], 'summary': 'Using optimizer atom with learning rate 0.0001, sparse categorical cross entropy loss, and specified metrics for model performance.', 'duration': 31.426, 'max_score': 1538.312, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1538312.jpg'}, {'end': 1642.691, 'src': 'embed', 'start': 1608.443, 'weight': 5, 'content': [{'end': 1612.245, 'text': 'our labels are currently stored in the train labels variable.', 'start': 1608.443, 'duration': 3.802}, {'end': 1614.407, 'text': 'So we are specifying that here.', 'start': 1612.285, 'duration': 2.122}, {'end': 1617.929, 'text': 'Next, we specify our batch size that we want to use for training.', 'start': 1615.007, 'duration': 2.922}, {'end': 1625.153, 'text': 'So this is how many samples are included in one batch to be passed and processed by the network at one time.', 'start': 1618.329, 'duration': 6.824}, {'end': 1626.986, 'text': "So we're setting this to 10.", 'start': 1625.526, 'duration': 1.46}, {'end': 1631.207, 'text': "And the number of epochs that we want to run, we're setting this to 30.", 'start': 1626.986, 'duration': 4.221}, {'end': 1642.691, 'text': 'So that means that the model is going to process or train on all of the data in the data set 30 times before completing the total training process.', 'start': 1631.207, 'duration': 11.484}], 'summary': 'Setting batch size to 10 and running 30 epochs for model training.', 'duration': 34.248, 'max_score': 1608.443, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1608443.jpg'}, {'end': 1676.843, 'src': 'embed', 'start': 1652.486, 'weight': 11, 'content': [{'end': 1662.213, 'text': 'But I was just bringing it to your attention to show or to make you aware of the fact that the data is being shuffled by default when we pass it to the network,', 'start': 1652.486, 'duration': 9.727}, {'end': 1672.46, 'text': 'which is a good thing, because we want any order that is inside of the data set to be kind of erased before we pass the data to the model,', 'start': 1662.213, 'duration': 10.247}, {'end': 1676.843, 'text': 'so that the model is not necessarily learning anything about the order of the data set.', 'start': 1672.46, 'duration': 4.383}], 'summary': 'Data is shuffled by default to erase order before passing to model.', 'duration': 24.357, 'max_score': 1652.486, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1652486.jpg'}, {'end': 1775.207, 'src': 'embed', 'start': 1750.531, 'weight': 0, 'content': [{'end': 1757.593, 'text': 'So as you can see, this model trained very quickly with each epoch taking only under one second to run.', 'start': 1750.531, 'duration': 7.062}, {'end': 1760.894, 'text': 'And within 30 epochs, we are already at a 94% accuracy rate.', 'start': 1757.953, 'duration': 2.941}, {'end': 1770.645, 'text': 'Now, although this is a very simple model and we were training it on very simple data, we can see that without much effort at all,', 'start': 1763.061, 'duration': 7.584}, {'end': 1775.207, 'text': 'we were able to yield pretty great results in a relatively quick manner of time as well.', 'start': 1770.645, 'duration': 4.562}], 'summary': 'Model trained quickly, achieving 94% accuracy in 30 epochs.', 'duration': 24.676, 'max_score': 1750.531, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1750531.jpg'}, {'end': 1900.317, 'src': 'embed', 'start': 1870.905, 'weight': 1, 'content': [{'end': 1879.49, 'text': 'we can actually get an understanding of how well our model is generalizing by introducing a validation set during the training process.', 'start': 1870.905, 'duration': 8.585}, {'end': 1882.911, 'text': 'To create a validation set before training begins.', 'start': 1879.83, 'duration': 3.081}, {'end': 1890.634, 'text': 'we can choose to take a subset of the training set and then separate it into a separate set labeled as validation data.', 'start': 1882.911, 'duration': 7.723}, {'end': 1900.317, 'text': 'And then during the training process, the model will only train on the training data and then will validate on the separated validation data.', 'start': 1891.454, 'duration': 8.863}], 'summary': 'Introducing a validation set helps assess model generalization and improve training process.', 'duration': 29.412, 'max_score': 1870.905, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1870905.jpg'}, {'end': 2131.83, 'src': 'embed', 'start': 2109.313, 'weight': 6, 'content': [{'end': 2117.315, 'text': "So it's important to note that whenever we do this, the validation set is completely held out of the training set.", 'start': 2109.313, 'duration': 8.002}, {'end': 2125.662, 'text': 'So the training samples that we remove from the training set into validation set are no longer contained within the training data any longer.', 'start': 2117.695, 'duration': 7.967}, {'end': 2131.83, 'text': 'So using this approach, the validation set will be created on the fly whenever we call the fit function.', 'start': 2126.103, 'duration': 5.727}], 'summary': 'Validation set is held out of training, created on the fly when calling fit function.', 'duration': 22.517, 'max_score': 2109.313, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2109313.jpg'}], 'start': 1085.174, 'title': 'Training neural networks with keras api', 'summary': 'Discusses creating artificial neural network with keras, building sequential model with specific layers, and training the neural network with keras api, achieving 94% accuracy in 30 epochs and emphasizing the importance of validation data to avoid overfitting.', 'chapters': [{'end': 1180.799, 'start': 1085.174, 'title': 'Creating artificial neural network with keras', 'summary': 'Discusses processing data into numpy array format, rescaling it, and importing tensorflow modules for building the first artificial neural network using keras api integrated within tensorflow.', 'duration': 95.625, 'highlights': ['Processing data into NumPy array format and rescaling it to be on a scale between zero and one.', 'Importing all necessary TensorFlow modules for building the first model.', 'Introduction to using a sequential model from the Keras API integrated within TensorFlow.']}, {'end': 1395.383, 'start': 1180.799, 'title': 'Building sequential model with keras', 'summary': 'Explains the process of building a sequential model using keras, consisting of an input layer, two hidden layers with 16 and 32 units, and an output layer with two units, aimed at classifying patient data into experiencing or not experiencing side effects.', 'duration': 214.584, 'highlights': ["The model consists of an input layer, two hidden layers with 16 and 32 units, and an output layer with two units. The model architecture is described, with the specification of layers and units, providing a clear overview of the model's structure.", 'The choice of 16 units in the first hidden layer is arbitrary and may not be sufficient for classifying the data effectively. The arbitrary choice of units in the first hidden layer is acknowledged as potentially insufficient for effective data classification, given the simplicity of the data itself.', 'The output layer has two units corresponding to the two possible output classes, and it uses the softmax function to generate probabilities for each class. The output layer is specified with two units for the two possible output classes, and the softmax function is utilized to produce probabilities for each class, aiding in determining the most probable class for a given patient.']}, {'end': 1676.843, 'start': 1395.879, 'title': 'Training neural network with keras api', 'summary': 'Covers the preparation and training of a neural network using the keras api integrated with tensorflow, including model compilation with specified optimizer, loss, and metrics, as well as the fit function parameters for batch size and epochs.', 'duration': 280.964, 'highlights': ['Model Compilation The model is compiled using the compile function, specifying the Adam optimizer with a learning rate of 0.0001, sparse categorical cross entropy as the loss function, and accuracy as the metric to evaluate model performance.', 'Training Process The fit function is called to initiate the training process, with the input data and target labels specified, a batch size of 10, and 30 epochs for training the model on the entire dataset.', 'Shuffling Data The data is shuffled by default before being passed to the model during training, erasing any inherent order within the dataset to prevent the model from learning based on data sequence.']}, {'end': 2372.474, 'start': 1677.27, 'title': 'Keras model training & validation', 'summary': 'Explains how to train a keras model with validation data, yielding a 94% accuracy in 30 epochs and demonstrates the importance of creating a validation set to avoid overfitting, while using the validation split parameter to create it on the fly.', 'duration': 695.204, 'highlights': ['The model yielded 94% accuracy in 30 epochs The model achieved a 94% accuracy after 30 epochs of training, demonstrating the effectiveness of the Keras model.', 'Importance of creating a validation set to avoid overfitting The chapter emphasizes the significance of creating a validation set to prevent overfitting, which occurs when the model learns the specific features of the training set but is unable to generalize on new data.', 'Using the validation split parameter to create a validation set on the fly The chapter explains the usage of the validation split parameter to create a validation set on the fly, ensuring that a portion of the training set is used for validation during the training process.']}], 'duration': 1287.3, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI1085174.jpg', 'highlights': ['The model achieved a 94% accuracy after 30 epochs of training, demonstrating the effectiveness of the Keras model.', 'The chapter emphasizes the significance of creating a validation set to prevent overfitting, which occurs when the model learns the specific features of the training set but is unable to generalize on new data.', 'The output layer has two units corresponding to the two possible output classes, and it uses the softmax function to generate probabilities for each class. The output layer is specified with two units for the two possible output classes, and the softmax function is utilized to produce probabilities for each class, aiding in determining the most probable class for a given patient.', "The model consists of an input layer, two hidden layers with 16 and 32 units, and an output layer with two units. The model architecture is described, with the specification of layers and units, providing a clear overview of the model's structure.", 'Model Compilation The model is compiled using the compile function, specifying the Adam optimizer with a learning rate of 0.0001, sparse categorical cross entropy as the loss function, and accuracy as the metric to evaluate model performance.', 'Training Process The fit function is called to initiate the training process, with the input data and target labels specified, a batch size of 10, and 30 epochs for training the model on the entire dataset.', 'Using the validation split parameter to create a validation set on the fly The chapter explains the usage of the validation split parameter to create a validation set on the fly, ensuring that a portion of the training set is used for validation during the training process.', 'Processing data into NumPy array format and rescaling it to be on a scale between zero and one.', 'Importing all necessary TensorFlow modules for building the first model.', 'Introduction to using a sequential model from the Keras API integrated within TensorFlow.', 'The choice of 16 units in the first hidden layer is arbitrary and may not be sufficient for classifying the data effectively. The arbitrary choice of units in the first hidden layer is acknowledged as potentially insufficient for effective data classification, given the simplicity of the data itself.', 'Shuffling Data The data is shuffled by default before being passed to the model during training, erasing any inherent order within the dataset to prevent the model from learning based on data sequence.']}, {'end': 3154.707, 'segs': [{'end': 2425.23, 'src': 'embed', 'start': 2398.001, 'weight': 2, 'content': [{'end': 2402.866, 'text': 'And hopefully the model is able to generalize well and give us good results on this new data.', 'start': 2398.001, 'duration': 4.865}, {'end': 2410.233, 'text': 'So as a simple example, suppose that we trained a network to be able to identify images of cats or dogs.', 'start': 2403.446, 'duration': 6.787}, {'end': 2419.444, 'text': 'And so during the training process, of course, we had a training set that say we downloaded from a website with 1000s of images of cats and dogs.', 'start': 2410.836, 'duration': 8.608}, {'end': 2425.23, 'text': 'So the hope is later that if we wanted to, we could maybe build a web app, for example,', 'start': 2420.085, 'duration': 5.145}], 'summary': 'Model trained on 1000s of cat and dog images to generalize well for new data.', 'duration': 27.229, 'max_score': 2398.001, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2398001.jpg'}, {'end': 2504.692, 'src': 'embed', 'start': 2481.784, 'weight': 0, 'content': [{'end': 2488.945, 'text': 'Typically, after the model has been trained and validated, we take the model and use it for inference purposes against the test set,', 'start': 2481.784, 'duration': 7.161}, {'end': 2498.227, 'text': 'just as one additional step to the validation, to make sure that the model is generalizing well before we deploy our model to production.', 'start': 2489.281, 'duration': 8.946}, {'end': 2504.692, 'text': "So at this point, the model that we've been working with over the last few episodes has been trained and validated.", 'start': 2498.547, 'duration': 6.145}], 'summary': 'Model trained, validated, and tested against the test set for generalization before deployment.', 'duration': 22.908, 'max_score': 2481.784, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2481784.jpg'}, {'end': 2576.546, 'src': 'embed', 'start': 2548.26, 'weight': 1, 'content': [{'end': 2554.101, 'text': "we're then taking that generated data and putting it into NumPy array format,", 'start': 2548.26, 'duration': 5.841}, {'end': 2563.803, 'text': 'then shuffling that data and then scaling the data to be on a scale from zero to one, rather than from the scale of 13 to 100..', 'start': 2554.101, 'duration': 9.702}, {'end': 2568.664, 'text': 'So, actually, that is the same exact process, using almost the same exact code,', 'start': 2563.803, 'duration': 4.861}, {'end': 2576.546, 'text': "except for we're working with our test labels and test samples variables rather than train labels and train samples.", 'start': 2568.664, 'duration': 7.882}], 'summary': 'Data is converted to numpy array, shuffled, and scaled to a 0-1 range for test labels and samples.', 'duration': 28.286, 'max_score': 2548.26, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2548260.jpg'}, {'end': 2734.463, 'src': 'embed', 'start': 2709.406, 'weight': 4, 'content': [{'end': 2726.438, 'text': 'this prediction says that the model is 92 or is assigning a 92% probability to this patient not experiencing a side effect and just a around 8% probability of the patient experiencing a side effect.', 'start': 2709.406, 'duration': 17.032}, {'end': 2734.463, 'text': 'So recall that we said no side effect experience was labeled as a zero and a side effect experience was labeled as a one.', 'start': 2726.839, 'duration': 7.624}], 'summary': 'Model predicts 92% no side effect, 8% chance of side effect', 'duration': 25.057, 'max_score': 2709.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2709406.jpg'}, {'end': 3028.725, 'src': 'heatmap', 'start': 2917.566, 'weight': 1, 'content': [{'end': 2921.751, 'text': "So the first thing we need to do is import the necessary packages that we'll be making use of.", 'start': 2917.566, 'duration': 4.185}, {'end': 2928.826, 'text': 'Next, we create our confusion matrix by calling this confusion matrix function from scikit learn.', 'start': 2923.163, 'duration': 5.663}, {'end': 2934.729, 'text': 'And we pass in our test labels as the true labels.', 'start': 2929.446, 'duration': 5.283}, {'end': 2946.073, 'text': 'And we pass in our predictions as the predictions that the confusion matrix expects and recall this rounded predictions variable,', 'start': 2935.469, 'duration': 10.604}, {'end': 2947.214, 'text': 'as well as the test labels.', 'start': 2946.073, 'duration': 1.141}, {'end': 2950.215, 'text': 'these were created in the last episode.', 'start': 2947.214, 'duration': 3.001}, {'end': 2957.678, 'text': 'So rounded predictions recall was when we use the argmax function to select only the most probable prediction.', 'start': 2950.675, 'duration': 7.003}, {'end': 2959.498, 'text': 'So now our predictions are in this format.', 'start': 2957.718, 'duration': 1.78}, {'end': 2966.521, 'text': 'And then our labels are zeros and ones that correspond to whether or not a patient had side effects or not.', 'start': 2960.219, 'duration': 6.302}, {'end': 2970.28, 'text': 'So next, we have this plot confusion matrix function.', 'start': 2967.017, 'duration': 3.263}, {'end': 2979.148, 'text': "And this is directly copied from scikit learns website, there's a link to the site on the corresponding blog where you can copy this exact function.", 'start': 2970.5, 'duration': 8.648}, {'end': 2986.995, 'text': 'But this is just a function that scikit learn has created to be able to easily plot in our notebook the confusion matrix,', 'start': 2979.488, 'duration': 7.507}, {'end': 2990.318, 'text': 'which is going to be the actual visual output that we want to see.', 'start': 2986.995, 'duration': 3.323}, {'end': 2993.392, 'text': 'So we just run this cell to define that function.', 'start': 2990.891, 'duration': 2.501}, {'end': 3000.573, 'text': 'And now we create this list that has the labels that we will use on our confusion matrix.', 'start': 2994.172, 'duration': 6.401}, {'end': 3005.414, 'text': 'So we want the labels of no side effects and had side effects.', 'start': 3000.973, 'duration': 4.441}, {'end': 3009.515, 'text': 'Those are the corresponding labels for our test data.', 'start': 3005.955, 'duration': 3.56}, {'end': 3016.297, 'text': "then we're going to call the plot confusion matrix function that we just brought in and defined above from scikit learn.", 'start': 3009.515, 'duration': 6.782}, {'end': 3020.178, 'text': 'And to that we are going to pass in our confusion matrix.', 'start': 3016.797, 'duration': 3.381}, {'end': 3028.725, 'text': 'and the classes for the confusion matrix, which we are specifying cm plot labels, which we define just right above.', 'start': 3021.022, 'duration': 7.703}], 'summary': 'Import packages, create and plot confusion matrix for test data with side effects.', 'duration': 111.159, 'max_score': 2917.566, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2917566.jpg'}, {'end': 3140.731, 'src': 'embed', 'start': 3109.272, 'weight': 3, 'content': [{'end': 3114.758, 'text': 'So that gives us about a 94% accuracy rate on our test set,', 'start': 3109.272, 'duration': 5.486}, {'end': 3119.965, 'text': 'which is equivalent to what we were seeing for our validation accuracy rate during training.', 'start': 3114.758, 'duration': 5.207}, {'end': 3121.865, 'text': 'So, as you can see, a confusion.', 'start': 3120.425, 'duration': 1.44}, {'end': 3132.749, 'text': 'matrix is a great tool to use to be able to visualize how well our model is doing at its predictions and also be able to drill in a little bit further to see for which classes it might need some work.', 'start': 3121.865, 'duration': 10.884}, {'end': 3140.731, 'text': 'Be sure to check out the blog and other resources available for this episode on deep lizard.com, as well as the deep lizard hive mind,', 'start': 3133.269, 'duration': 7.462}], 'summary': 'Model achieves 94% accuracy rate, matching validation accuracy. confusion matrix helps visualize and identify classes needing improvement.', 'duration': 31.459, 'max_score': 3109.272, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI3109272.jpg'}], 'start': 2373.114, 'title': "Model inference with tensorflow's keras api", 'summary': 'Discusses using a neural network for inference, preparing a test set, making predictions, interpreting and visualizing results using a confusion matrix, achieving approximately 94% accuracy on the test set.', 'chapters': [{'end': 2568.664, 'start': 2373.114, 'title': 'Inference with neural network in tensorflow', 'summary': "Discusses the use of a neural network for inference to predict on new data, the process of creating a test set, and the steps involved in preparing the test set for inference in tensorflow's keras api.", 'duration': 195.55, 'highlights': ['The process of creating a test set involves setting up samples and labels, generating data, converting it to NumPy array format, shuffling, and scaling it to be on a scale from zero to one.', 'The model is trained to identify images of cats or dogs, and the hope is that it can generalize well to predict with high accuracy on new data.', 'The model is validated against the test set to ensure it generalizes well before deployment to production.']}, {'end': 3154.707, 'start': 2568.664, 'title': 'Confusion matrix for model inference', 'summary': 'Demonstrates the process of preparing and processing the test set in the same format as the training data, using the test set to make predictions, interpreting the predictions, and visualizing the prediction results using a confusion matrix, achieving about a 94% accuracy rate on the test set.', 'duration': 586.043, 'highlights': ['The model predicts on all of the data in the test set using the predict function, specifying parameters such as x, batch size, and verbose. The model predicts on the test data using the predict function, specifying x as the scaled test samples, a batch size of 10, and setting verbose to 0.', 'Interpreting the predictions, each prediction provides a probability for the patient not experiencing a side effect and experiencing a side effect, with specific probabilities mapped to the corresponding labels, 0 for no side effect and 1 for side effect. Each prediction provides probabilities for the patient not experiencing a side effect and experiencing a side effect, with specific probabilities mapped to the corresponding labels, 0 for no side effect and 1 for side effect.', 'Using a confusion matrix, the model achieved about a 94% accuracy rate on the test set, equivalent to the validation accuracy rate during training. The confusion matrix visualizes how well the model predicts on the test data, revealing about a 94% accuracy rate, equivalent to the validation accuracy rate during training.']}], 'duration': 781.593, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI2373114.jpg', 'highlights': ['The model is validated against the test set to ensure it generalizes well before deployment to production.', 'The process of creating a test set involves setting up samples and labels, generating data, converting it to NumPy array format, shuffling, and scaling it to be on a scale from zero to one.', 'The model is trained to identify images of cats or dogs, and the hope is that it can generalize well to predict with high accuracy on new data.', 'Using a confusion matrix, the model achieved about a 94% accuracy rate on the test set, equivalent to the validation accuracy rate during training.', 'Interpreting the predictions, each prediction provides a probability for the patient not experiencing a side effect and experiencing a side effect, with specific probabilities mapped to the corresponding labels, 0 for no side effect and 1 for side effect.']}, {'end': 4338.734, 'segs': [{'end': 3183.181, 'src': 'embed', 'start': 3155.208, 'weight': 0, 'content': [{'end': 3160.933, 'text': "In this episode, we'll demonstrate the multiple ways that we can save and load a Keras sequential model.", 'start': 3155.208, 'duration': 5.725}, {'end': 3172.143, 'text': 'We have a few different options when it comes to saving and loading a Keras sequential model.', 'start': 3167.819, 'duration': 4.324}, {'end': 3175.266, 'text': 'And these all work a little bit differently from one another.', 'start': 3172.644, 'duration': 2.622}, {'end': 3177.268, 'text': "So we're going to go through all of the options now.", 'start': 3175.346, 'duration': 1.922}, {'end': 3183.181, 'text': "We've been working with a single model over the last few episodes, and we're going to continue working with that one now.", 'start': 3177.776, 'duration': 5.405}], 'summary': 'Demonstrating multiple ways to save and load a keras sequential model.', 'duration': 27.973, 'max_score': 3155.208, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI3155208.jpg'}, {'end': 3408.179, 'src': 'embed', 'start': 3382.501, 'weight': 1, 'content': [{'end': 3388.105, 'text': 'And again, that is the most comprehensive option to save and load everything about a particular model.', 'start': 3382.501, 'duration': 5.604}, {'end': 3392.888, 'text': "The next option that we'll look at is using this function called to JSON.", 'start': 3388.865, 'duration': 4.023}, {'end': 3395.45, 'text': 'So we call model dot to JSON.', 'start': 3393.328, 'duration': 2.122}, {'end': 3402.234, 'text': "if we only need to save the architecture of the model so we don't want to set its weights or the training configuration,", 'start': 3395.45, 'duration': 6.784}, {'end': 3408.179, 'text': 'then we can just save the model architecture by saving it to a JSON string.', 'start': 3402.234, 'duration': 5.945}], 'summary': 'Save and load model using to json function for architecture only.', 'duration': 25.678, 'max_score': 3382.501, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI3382501.jpg'}, {'end': 3720.202, 'src': 'embed', 'start': 3691.977, 'weight': 2, 'content': [{'end': 3699.672, 'text': "In this episode, we'll go through all the necessary image preparation and processing steps needed to train our first convolutional neural network.", 'start': 3691.977, 'duration': 7.695}, {'end': 3715.199, 'text': 'Our goal over the next few episodes will be to build and train a convolutional neural network that can classify images as cats or dogs.', 'start': 3706.812, 'duration': 8.387}, {'end': 3720.202, 'text': "The first thing that we need to do is get and prepare our data set for which we'll be training our model.", 'start': 3715.459, 'duration': 4.743}], 'summary': 'Preparing image data for training a convolutional neural network to classify cats or dogs.', 'duration': 28.225, 'max_score': 3691.977, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI3691977.jpg'}], 'start': 3155.208, 'title': 'Saving and loading keras sequential model', 'summary': 'Covers the various methods for saving and loading a keras sequential model, emphasizing the different options available and the importance of having the model already created in the jupyter notebook. it also explains three ways to save and load a model in tensorflow, with 1000 images for training, 200 for validation, and 100 for testing.', 'chapters': [{'end': 3195.431, 'start': 3155.208, 'title': 'Saving and loading keras sequential model', 'summary': 'Covers the various methods for saving and loading a keras sequential model, emphasizing the different options available and the importance of having the model already created in the jupyter notebook.', 'duration': 40.223, 'highlights': ['The chapter covers the various methods for saving and loading a Keras sequential model, emphasizing the different options available and the importance of having the model already created in the Jupyter Notebook.', 'Demonstration of multiple ways to save and load a Keras sequential model, showcasing the different options and their respective functionalities.', 'Importance of having the model already created in the Jupyter Notebook before demonstrating how to save it.']}, {'end': 3669.139, 'start': 3196.011, 'title': 'Ways to save and load models', 'summary': "Explains three ways to save and load a model in tensorflow: using model.save to save the entire model including architecture, weights, and training configuration, model.to_json to save only the architecture, and model.save_weights to save just the weights. the chapter also covers loading the model, inspecting the new model's architecture and weights, and the potential need for retraining with the second and third options.", 'duration': 473.128, 'highlights': ["The most comprehensive option to save a model is using model.save, which saves the model's architecture, weights, and training configuration, allowing for later loading and continuation of training. model.save saves the architecture, learnable parameters, and the state of the model, enabling continuation of training where it left off.", 'Using model.to_json allows saving only the architecture of the model to a JSON string, which can later be used to create a new model with the same architecture. model.to_json saves the model architecture as a JSON string, and the saved JSON can be used to create a new model with the same architecture.', 'model.save_weights function can be used to solely save the weights of a model, and these weights can later be loaded into a new model with the same architecture. model.save_weights allows saving only the weights of a model, which can then be loaded into a new model with the same architecture.']}, {'end': 4338.734, 'start': 3669.819, 'title': 'Image preparation for convolutional neural network training', 'summary': 'Covers the necessary steps to prepare and process image data for training a convolutional neural network to classify cats or dogs, including organizing the dataset, setting up directory structure, and creating data batches, with a subset of 1000 images for training, 200 for validation, and 100 for testing.', 'duration': 668.915, 'highlights': ['The chapter covers the necessary steps to prepare and process image data for training a convolutional neural network to classify cats or dogs, including organizing the dataset, setting up directory structure, and creating data batches, with a subset of 1000 images for training, 200 for validation, and 100 for testing.', 'The dataset contains 25,000 images of dogs and cats, but a subset of 1000 images will be used for training, 200 for validation, and 100 for testing, split evenly among cats and dogs, to avoid longer training times with the entire dataset.', 'The process involves organizing the data into train, validation, and test sets programmatically through code, with the script moving 500 randomly selected cat and dog images to the respective train, validation, and test directories.', "The images are preprocessed using a function equivalent to the VGG 16 model's image preprocessing format, which will be discussed in more detail in a future episode, to prepare the images before passing them to the network."]}], 'duration': 1183.526, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI3155208.jpg', 'highlights': ['Covers the various methods for saving and loading a Keras sequential model, emphasizing the different options available and the importance of having the model already created in the Jupyter Notebook.', "The most comprehensive option to save a model is using model.save, which saves the model's architecture, weights, and training configuration, allowing for later loading and continuation of training.", 'The chapter covers the necessary steps to prepare and process image data for training a convolutional neural network to classify cats or dogs, including organizing the dataset, setting up directory structure, and creating data batches, with a subset of 1000 images for training, 200 for validation, and 100 for testing.']}, {'end': 5833.263, 'segs': [{'end': 4539.191, 'src': 'heatmap', 'start': 4417.375, 'weight': 0, 'content': [{'end': 4423.777, 'text': 'Now. this is because whenever we use our test batches later for inference,', 'start': 4417.375, 'duration': 6.402}, {'end': 4430.26, 'text': 'to get our model to predict on images of cats and dogs after training and validation has been completed,', 'start': 4423.777, 'duration': 6.483}, {'end': 4436.142, 'text': "we're going to want to look at our prediction results in a confusion matrix, like we did in a previous video, for a separate data set.", 'start': 4430.26, 'duration': 5.882}, {'end': 4442.687, 'text': 'And in order to do that, we need to be able to access the unshuffled labels for our test set.', 'start': 4436.741, 'duration': 5.946}, {'end': 4451.276, 'text': "So that's why we set shuffle equals false for only this set for both validation and training sets, we do want the data sets to be shuffled.", 'start': 4442.907, 'duration': 8.369}, {'end': 4458.503, 'text': 'Alright, so we run this and we get the output of found 1000 images belonging to two classes.', 'start': 4451.616, 'duration': 6.887}, {'end': 4468.095, 'text': 'And that is corresponding to our train batches, found 200 images belonging to two classes, which corresponds to valid valid batches,', 'start': 4459.11, 'duration': 8.985}, {'end': 4472.478, 'text': 'and then the 100 belonging to two classes corresponding to our test batches.', 'start': 4468.095, 'duration': 4.383}, {'end': 4475.34, 'text': 'So that is the output that you want to see for yourself.', 'start': 4472.838, 'duration': 2.502}, {'end': 4483.605, 'text': "That's letting you know that it found the images on disk that belong to both the cat and dog classes that you have specified here.", 'start': 4475.68, 'duration': 7.925}, {'end': 4491.209, 'text': "So if you are not getting this at this point, if you get found zero images, then perhaps you're pointing to the wrong place on disk.", 'start': 4484.025, 'duration': 7.184}, {'end': 4495.111, 'text': "you just need to make sure that it's able to find all the images that you set up previously.", 'start': 4491.209, 'duration': 3.902}, {'end': 4499.234, 'text': 'Right in here, we are just verifying that that is indeed the case.', 'start': 4495.772, 'duration': 3.462}, {'end': 4508.212, 'text': 'Now next, we are going to just grab a single batch of images and the corresponding labels from our train batches.', 'start': 4499.727, 'duration': 8.485}, {'end': 4511.234, 'text': 'And remember, our batch size is 10.', 'start': 4509.153, 'duration': 2.081}, {'end': 4515.717, 'text': 'So this should be 10 images along with the 10 corresponding labels.', 'start': 4511.234, 'duration': 4.483}, {'end': 4525.327, 'text': "Next, we're introducing this function plot images that we're going to use to plot the images from our train batches that we just obtained above.", 'start': 4516.764, 'duration': 8.563}, {'end': 4528.748, 'text': "And this function is directly from TensorFlow's website.", 'start': 4525.967, 'duration': 2.781}, {'end': 4539.191, 'text': "So check the link in the corresponding blog for this episode on deep blizzard.com to see to be able to get to TensorFlow's site where exactly I pulled this off of.", 'start': 4528.808, 'duration': 10.383}], 'summary': 'Setting shuffle equals false for test set, found 1000 train images, 200 validation images, and 100 test images.', 'duration': 66.23, 'max_score': 4417.375, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4417375.jpg'}, {'end': 4581.538, 'src': 'embed', 'start': 4549.721, 'weight': 2, 'content': [{'end': 4553.244, 'text': "And we're going to print the corresponding labels for those images.", 'start': 4549.721, 'duration': 3.523}, {'end': 4560.408, 'text': 'So if we scroll down, we can see this is what a batch of training data looks like.', 'start': 4554.204, 'duration': 6.204}, {'end': 4568.518, 'text': 'So this might be a little bit different than what you expected, given the fact that it looks like the color data has been a little bit distorted.', 'start': 4561.169, 'duration': 7.349}, {'end': 4581.538, 'text': "And that's due to the pre processing function that we called to pre process the images in such a way that in the same type of way that images get pre processed for the famous BGG 16 model.", 'start': 4569.058, 'duration': 12.48}], 'summary': 'Training data batch displays color distortion due to pre-processing function.', 'duration': 31.817, 'max_score': 4549.721, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4549721.jpg'}, {'end': 4758.508, 'src': 'embed', 'start': 4728.165, 'weight': 5, 'content': [{'end': 4731.987, 'text': 'if you do not have access to the labels for your test set.', 'start': 4728.165, 'duration': 3.822}, {'end': 4741.014, 'text': 'Alright, so now we have obtained our image data, organized it on disk and processed it accordingly for our convolutional neural network.', 'start': 4732.488, 'duration': 8.526}, {'end': 4747.618, 'text': 'So now, in the next episode, we are going to get set up to start building and training our first CNN.', 'start': 4741.454, 'duration': 6.164}, {'end': 4752.502, 'text': 'be sure to check out the blog and other resources available for this episode on the blizzard.com.', 'start': 4747.618, 'duration': 4.884}, {'end': 4758.508, 'text': 'as well as the Deep Blizzard Hivemind where you can gain access to exclusive perks and rewards.', 'start': 4753.143, 'duration': 5.365}], 'summary': 'Preparing for cnn training, accessing blog and resources on blizzard.com.', 'duration': 30.343, 'max_score': 4728.165, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4728165.jpg'}, {'end': 4853.701, 'src': 'embed', 'start': 4828.57, 'weight': 3, 'content': [{'end': 4833.676, 'text': "And to this layer, we're arbitrarily setting the filter value equal to 32.", 'start': 4828.57, 'duration': 5.106}, {'end': 4839.783, 'text': 'So this first convolutional layer will have 32 filters with a kernel size of three by three.', 'start': 4833.676, 'duration': 6.107}, {'end': 4847.66, 'text': 'So the choice of 32 is pretty arbitrary, but the kernel size of three by three is a very common choice for image data.', 'start': 4840.498, 'duration': 7.162}, {'end': 4853.701, 'text': 'Now this first conf 2d layer will be followed by the popular relu activation function.', 'start': 4848.22, 'duration': 5.481}], 'summary': 'The first convolutional layer has 32 filters with a 3x3 kernel, followed by the popular relu activation function.', 'duration': 25.131, 'max_score': 4828.57, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4828570.jpg'}, {'end': 4950.083, 'src': 'embed', 'start': 4903.748, 'weight': 4, 'content': [{'end': 4913.531, 'text': 'Whenever we created our valid test and train directory iterators, we said that we wanted our images to be of this height and width.', 'start': 4903.748, 'duration': 9.783}, {'end': 4916.952, 'text': 'And then this three here is regarding the color channels.', 'start': 4913.951, 'duration': 3.001}, {'end': 4923.434, 'text': 'Since these, since these images are in RGB format, we have three color channels.', 'start': 4917.312, 'duration': 6.122}, {'end': 4925.295, 'text': 'So we specified this input shape.', 'start': 4923.494, 'duration': 1.801}, {'end': 4935.136, 'text': "So then we follow our first convolutional layer with a max pooling layer, where we're setting our pool size to two by two and our strides by two.", 'start': 4925.768, 'duration': 9.368}, {'end': 4941.522, 'text': 'And if you are familiar with max pooling, then you know this is going to cut our image dimensions in half.', 'start': 4935.777, 'duration': 5.745}, {'end': 4950.083, 'text': 'So if you need to know more about max pooling or you just need a refresher same thing with padding here for zero padding activation functions,', 'start': 4942.577, 'duration': 7.506}], 'summary': 'Using rgb images with 3 color channels, implementing max pooling to reduce image dimensions by half.', 'duration': 46.335, 'max_score': 4903.748, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4903748.jpg'}, {'end': 5041.928, 'src': 'embed', 'start': 4971.381, 'weight': 6, 'content': [{'end': 4976.503, 'text': 'And we are specifying the filters to be 64 here instead of 32.', 'start': 4971.381, 'duration': 5.122}, {'end': 4981.145, 'text': 'So 64 is again an arbitrary choice, I just chose that number here.', 'start': 4976.503, 'duration': 4.642}, {'end': 4989.748, 'text': 'But the general rule of increasing functions as you go into later layers of the network is common practice.', 'start': 4981.325, 'duration': 8.423}, {'end': 4995.771, 'text': 'We then follow this second convolutional layer with another max pulling layer identical to the first one.', 'start': 4990.229, 'duration': 5.542}, {'end': 5004.217, 'text': 'Then we flatten all of this into a one dimensional tensor before passing it to our dense output layer,', 'start': 4996.391, 'duration': 7.826}, {'end': 5007.88, 'text': 'which only has two nodes corresponding to cat and dog.', 'start': 5004.217, 'duration': 3.663}, {'end': 5015.446, 'text': 'And our output layer is being followed by the softmax after activation function which, as you know,', 'start': 5008.461, 'duration': 6.985}, {'end': 5020.239, 'text': 'is going to give us probabilities for each corresponding output from the model.', 'start': 5015.446, 'duration': 4.793}, {'end': 5025.781, 'text': 'Alright, so if we run this, we can then check out the summary of our model.', 'start': 5020.64, 'duration': 5.141}, {'end': 5036.245, 'text': 'And this is what we have exactly what we built, along with some additional details about the learnable parameters and the output shape of the network.', 'start': 5026.622, 'duration': 9.623}, {'end': 5041.928, 'text': 'So these are things that are also covered in the in the deep learning fundamentals course as well,', 'start': 5036.726, 'duration': 5.202}], 'summary': 'Neural network with 64 filters, 2 output nodes, and softmax activation for probabilities.', 'duration': 70.547, 'max_score': 4971.381, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4971381.jpg'}, {'end': 5235.403, 'src': 'embed', 'start': 5212.325, 'weight': 10, 'content': [{'end': 5222.215, 'text': "And that's because when data is stored as a generator, as we have here, the the generator itself actually contains the corresponding labels.", 'start': 5212.325, 'duration': 9.89}, {'end': 5229.562, 'text': "So we do not need to specify them separately whenever we call fit because they're actually contained within the generator itself.", 'start': 5222.695, 'duration': 6.867}, {'end': 5231.797, 'text': "So let's go ahead and run this now.", 'start': 5230.014, 'duration': 1.783}, {'end': 5233.961, 'text': 'Alright, so the model just finished training.', 'start': 5232.018, 'duration': 1.943}, {'end': 5235.403, 'text': "So let's check out the results.", 'start': 5234.281, 'duration': 1.122}], 'summary': 'Data stored as a generator contains corresponding labels; no need to specify separately when calling fit. model finished training.', 'duration': 23.078, 'max_score': 5212.325, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI5212325.jpg'}, {'end': 5322.1, 'src': 'embed', 'start': 5295.05, 'weight': 12, 'content': [{'end': 5298.711, 'text': "And that'll get us exposed to the concept of fine tuning.", 'start': 5295.05, 'duration': 3.661}, {'end': 5307.634, 'text': 'Before we do that, though, we are going to see in the next episode, how this model holds up to inference at predicting on images in our test set.', 'start': 5299.271, 'duration': 8.363}, {'end': 5313.336, 'text': 'Be sure to check out the blog and other resources available for this episode on the blizzard.com.', 'start': 5308.454, 'duration': 4.882}, {'end': 5319.358, 'text': 'as well as the Deep Blizzard Hivemind where you can gain access to exclusive perks and rewards.', 'start': 5313.996, 'duration': 5.362}, {'end': 5322.1, 'text': 'Thanks for contributing to Collective Intelligence.', 'start': 5320.079, 'duration': 2.021}], 'summary': 'Introduction to fine tuning and upcoming episode preview for image prediction tests on the model.', 'duration': 27.05, 'max_score': 5295.05, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI5295050.jpg'}, {'end': 5369.468, 'src': 'embed', 'start': 5346.451, 'weight': 11, 'content': [{'end': 5354.442, 'text': 'Last time we built and trained our first CNN against cat and dog image data and we saw that the training results were great,', 'start': 5346.451, 'duration': 7.991}, {'end': 5357.986, 'text': 'with the model achieving 100% accuracy on the training set.', 'start': 5354.442, 'duration': 3.544}, {'end': 5364.675, 'text': 'However, it lagged behind by quite a good bit at only 70% accuracy on our validation set.', 'start': 5358.567, 'duration': 6.108}, {'end': 5369.468, 'text': "So that tells us that the model wasn't generalizing as well as we hoped.", 'start': 5365.427, 'duration': 4.041}], 'summary': 'First cnn achieved 100% accuracy on training set but only 70% on validation set, indicating poor generalization.', 'duration': 23.017, 'max_score': 5346.451, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI5346451.jpg'}], 'start': 4339.554, 'title': 'Cnn training & overfitting', 'summary': "Covers setting up data sets with 1000 images for training, 200 for validation, and 100 for testing, building and training a cnn with tensorflow's keras api using 32 filters and a 3x3 kernel, training a cnn model with details on layer configurations and addressing overfitting issues with a pre-trained model for inference.", 'chapters': [{'end': 4590.508, 'start': 4339.554, 'title': 'Setting up data sets and batches', 'summary': 'Explains how to set up training, validation, and test data sets, specifying image sizes, classes, and batch sizes, and the importance of unshuffled labels for the test set, resulting in 1000 images for training, 200 images for validation, and 100 images for testing.', 'duration': 250.954, 'highlights': ['Specifying image sizes, classes, and batch sizes for training, validation, and test data sets resulted in 1000 images for training, 200 images for validation, and 100 images for testing. The output of found 1000 images belonging to two classes corresponds to train batches, found 200 images belonging to two classes corresponds to valid batches, and 100 belonging to two classes corresponds to test batches.', 'Importance of unshuffled labels for the test set and the significance of accessing unshuffled labels for test set inference. Setting shuffle equals false for test batches is crucial for accessing unshuffled labels during test set inference, enabling the creation of a confusion matrix for prediction results.', 'Usage of pre-processing function for images and its impact on color data and the similarity to the pre-processing for the VGG 16 model. The pre-processing function applied to the images led to some distortion in the color data, aligning with the pre-processing used for the VGG 16 model, with further technical details to be discussed in a later video.']}, {'end': 4925.295, 'start': 4591.209, 'title': 'Cnn building & training with tensorflow', 'summary': "Gives an overview of preparing and processing image data, creating a convolutional neural network with tensorflow's keras api, and setting up the first layer with 32 filters and a kernel size of 3x3 for image data.", 'duration': 334.086, 'highlights': ['The first layer of the CNN is a convolutional layer with 32 filters and a kernel size of 3x3, followed by the popular relu activation function and zero padding for the images. The first layer of the CNN consists of a convolutional layer with 32 filters and a kernel size of 3x3, followed by the relu activation function and zero padding for the images.', 'The input shape of the data for the first layer is specified as 224x224x3, representing the height, width, and color channels of the RGB format. The input shape for the first layer is specified as 224x224x3, representing the height, width, and color channels of the RGB format.', 'The episode provides guidance on processing image data and obtaining corresponding labels for a convolutional neural network model. The episode offers guidance on processing image data and obtaining corresponding labels for a convolutional neural network model.']}, {'end': 5250.986, 'start': 4925.768, 'title': 'Convolutional network training', 'summary': 'Covers the process of building and training a convolutional neural network with specific details on layer configurations, activation functions, optimizer settings, and model training parameters, emphasizing the use of max pooling, increasing filters in later layers, softmax activation for output layer, and generator-contained labels for training data.', 'duration': 325.218, 'highlights': ['The process of building and training a convolutional neural network is covered in the chapter. Building and training a convolutional neural network, specific details on layer configurations, activation functions, optimizer settings, and model training parameters.', 'The use of max pooling is emphasized, which cuts the image dimensions in half. Emphasis on max pooling, which reduces image dimensions.', 'The general rule of increasing filters in later layers of the network is highlighted as common practice, with the choice of 64 filters over 32 explained as arbitrary. Emphasis on increasing filters in later layers, arbitrary choice of 64 filters over 32.', 'The use of softmax activation for the output layer to generate probabilities for each corresponding output from the model is explained. Explanation of using softmax activation for output layer to generate probabilities.', 'The process of training the model using generator-contained labels and specifying the training and validation data is detailed. Training the model using generator-contained labels, specifying training and validation data.']}, {'end': 5833.263, 'start': 5251.366, 'title': 'Cnn overfitting issue', 'summary': 'Demonstrates training a cnn model with 100% accuracy on the training set but only 69% on the validation set, indicating overfitting, and then proceeds to showcase the use of a pre-trained model for inference on image data.', 'duration': 581.897, 'highlights': ['The model achieves 100% accuracy on the training set but only 69% on the validation set, indicating overfitting. The chapter highlights the overfitting issue of the CNN model, with 100% accuracy on the training set but lagging behind at 69% on the validation set.', 'The plan to use a pre-trained model for inference on image data is mentioned, indicating a future episode will cover the concept of fine-tuning. The chapter mentions the future plan to use a pre-trained model for inference and introduces the concept of fine-tuning.', 'The process of obtaining predictions from the model and analyzing them using a confusion matrix is described. The chapter details the process of obtaining predictions from the model and analyzing them using a confusion matrix, indicating a tool for visualizing the results.']}], 'duration': 1493.709, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI4339554.jpg', 'highlights': ['Specifying image sizes, classes, and batch sizes for training, validation, and test data sets resulted in 1000 images for training, 200 images for validation, and 100 images for testing.', 'Setting shuffle equals false for test batches is crucial for accessing unshuffled labels during test set inference, enabling the creation of a confusion matrix for prediction results.', 'The pre-processing function applied to the images led to some distortion in the color data, aligning with the pre-processing used for the VGG 16 model.', 'The first layer of the CNN is a convolutional layer with 32 filters and a kernel size of 3x3, followed by the popular relu activation function and zero padding for the images.', 'The input shape for the first layer is specified as 224x224x3, representing the height, width, and color channels of the RGB format.', 'The episode offers guidance on processing image data and obtaining corresponding labels for a convolutional neural network model.', 'Building and training a convolutional neural network, specific details on layer configurations, activation functions, optimizer settings, and model training parameters.', 'Emphasis on max pooling, which reduces image dimensions.', 'Emphasis on increasing filters in later layers, arbitrary choice of 64 filters over 32.', 'Explanation of using softmax activation for output layer to generate probabilities.', 'Training the model using generator-contained labels, specifying training and validation data.', 'The chapter highlights the overfitting issue of the CNN model, with 100% accuracy on the training set but lagging behind at 69% on the validation set.', 'The chapter mentions the future plan to use a pre-trained model for inference and introduces the concept of fine-tuning.', 'The chapter details the process of obtaining predictions from the model and analyzing them using a confusion matrix, indicating a tool for visualizing the results.']}, {'end': 6767.969, 'segs': [{'end': 6051.622, 'src': 'embed', 'start': 6025.932, 'weight': 2, 'content': [{'end': 6033.497, 'text': 'And then for each sample in the training set, every green pixel, they subtracted that green value from it.', 'start': 6025.932, 'duration': 7.565}, {'end': 6035.878, 'text': 'So and same thing for the blue, of course.', 'start': 6034.198, 'duration': 1.68}, {'end': 6038.499, 'text': "So that's what they did for the pre processing.", 'start': 6036.258, 'duration': 2.241}, {'end': 6047.461, 'text': "So, given that that's how VGG 16 was originally trained, that means now, whenever new data is passed to the model,", 'start': 6039.019, 'duration': 8.442}, {'end': 6051.622, 'text': 'that it needs to be processed in the same exact way as the original training set.', 'start': 6047.461, 'duration': 4.161}], 'summary': 'In pre-processing for vgg 16, green and blue pixel values were subtracted from each sample in the training set.', 'duration': 25.69, 'max_score': 6025.932, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6025932.jpg'}, {'end': 6162.917, 'src': 'embed', 'start': 6135.074, 'weight': 4, 'content': [{'end': 6143.261, 'text': 'Now recall, I said that this VGG 16 model originally was predicting for 1000 different ImageNet classes.', 'start': 6135.074, 'duration': 8.187}, {'end': 6148.085, 'text': 'So here we can see our output layer of the VGG 16 model has 1000 different outputs.', 'start': 6143.501, 'duration': 4.584}, {'end': 6162.917, 'text': 'So our objective is going to simply be to change this last output layer to predict only two output classes corresponding to cat and dog,', 'start': 6151.388, 'duration': 11.529}], 'summary': 'Vgg 16 model originally predicted for 1000 imagenet classes, now being changed to predict only two classes for cat and dog.', 'duration': 27.843, 'max_score': 6135.074, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6135074.jpg'}, {'end': 6442.097, 'src': 'embed', 'start': 6415.458, 'weight': 1, 'content': [{'end': 6426.426, 'text': 'Except for now, we have this new dense layer as our output layer, which only has two classes instead of 1000 from the original VGG 16 model.', 'start': 6415.458, 'duration': 10.968}, {'end': 6431.649, 'text': 'we can also see that our model now only has 8000 trainable parameters.', 'start': 6426.426, 'duration': 5.223}, {'end': 6434.732, 'text': 'And those are all within our output layer.', 'start': 6431.829, 'duration': 2.903}, {'end': 6438.534, 'text': 'As I said that our output layer is our only trainable layer.', 'start': 6435.632, 'duration': 2.902}, {'end': 6442.097, 'text': 'So before actually, all of our layers are trainable.', 'start': 6439.055, 'duration': 3.042}], 'summary': 'New output layer with 2 classes, 8000 trainable parameters.', 'duration': 26.639, 'max_score': 6415.458, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6415458.jpg'}, {'end': 6730.237, 'src': 'embed', 'start': 6691.518, 'weight': 0, 'content': [{'end': 6698.723, 'text': 'That model actually did really well on the training data reaching 100% accuracy after a small amount of epochs as well.', 'start': 6691.518, 'duration': 7.205}, {'end': 6703.306, 'text': 'Where we saw it lagging, though, was with the validation accuracy.', 'start': 6699.603, 'duration': 3.703}, {'end': 6707.359, 'text': 'it had a validation accuracy of around 70%.', 'start': 6704.116, 'duration': 3.243}, {'end': 6709.801, 'text': 'Here we see that we are at 98%.', 'start': 6707.359, 'duration': 2.442}, {'end': 6723.111, 'text': 'So the main recognizable difference between our very simple CNN and this Fiji G 16 fine tuned model is how well this model generalizes to our cat and dog data in the validation set.', 'start': 6709.801, 'duration': 13.31}, {'end': 6730.237, 'text': 'Whereas the model we built from scratch did not generalize so well on data that was not included in the training set.', 'start': 6723.431, 'duration': 6.806}], 'summary': 'A model achieved 100% training accuracy, but only 70% validation accuracy, showing limitations in generalization compared to a fiji g 16 fine-tuned model.', 'duration': 38.719, 'max_score': 6691.518, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6691518.jpg'}], 'start': 5834.063, 'title': 'Fine-tuning vgg16 model for cat and dog classification', 'summary': 'Demonstrates the process of fine-tuning the pre-trained vgg16 model to classify images into cat and dog categories, achieving 99% training accuracy and 98% validation accuracy after five epochs, with the majority of parameters frozen to prevent retraining.', 'chapters': [{'end': 6088.24, 'start': 5834.063, 'title': 'Fine tuning vgg16 model for image classification', 'summary': 'Demonstrates how to fine-tune the pre-trained vgg16 model to classify images into two categories, cat and dog, from its original training on 1000 classes, and discusses the pre-processing done by vgg16.', 'duration': 254.177, 'highlights': ['The pre-trained model VGG16 won the 2014 ImageNet competition and was trained on a library of 1000 classes. VGG16 won the 2014 ImageNet competition and was trained on a library of 1000 classes.', 'The VGG16 model is fine-tuned to classify only on the two categories of cat and dog, requiring minimal tuning due to the original inclusion of cats and dogs in the ImageNet library. VGG16 is fine-tuned to classify only on the two categories of cat and dog, requiring minimal tuning due to the original inclusion of cats and dogs in the ImageNet library.', 'The pre-processing for VGG16 involves subtracting the mean RGB value computed on the training set from each pixel in the image, ensuring that new data is processed in the same way as the original training set. The pre-processing for VGG16 involves subtracting the mean RGB value computed on the training set from each pixel in the image, ensuring that new data is processed in the same way as the original training set.']}, {'end': 6507.839, 'start': 6088.28, 'title': 'Fine-tuning vgg 16 model for cat and dog classification', 'summary': "Details the process of fine-tuning the vgg 16 model for cat and dog classification, with the model having almost 140 million parameters and being over 500 megabytes in size, the output layer being modified to predict only two output classes, and the majority of the model's parameters being frozen to prevent retraining.", 'duration': 419.559, 'highlights': ['The VGG 16 model has almost 140 million parameters and is over 500 megabytes in size. The model is complex, with almost 140 million parameters and over 500 megabytes in size.', 'The output layer of the VGG 16 model has 1000 different outputs, which is modified to predict only two output classes for cat and dog. The output layer of the VGG 16 model is originally designed for 1000 different ImageNet classes but is modified to predict only two output classes for cat and dog.', "The majority of the model's parameters are frozen, with only the last output layer being trainable, resulting in the model having 8000 trainable parameters. The majority of the model's parameters are frozen, leaving only the last output layer as the trainable layer, resulting in 8000 trainable parameters in the model."]}, {'end': 6767.969, 'start': 6508.559, 'title': 'Training vgg16 model on cats and dogs', 'summary': "Demonstrates training a fine-tuned vgg16 model on a dataset of cats and dogs, achieving an outstanding 99% training accuracy and 98% validation accuracy after five epochs, highlighting the model's ability to generalize well to the validation set.", 'duration': 259.41, 'highlights': ['The model achieved a training accuracy of 99% and a validation accuracy of 98% after just five epochs. The trained VGG16 model achieved impressive accuracy rates of 99% on the training data and 98% on the validation data after just five epochs.', "The VGG16 model showed significant improvement in generalization compared to a simple CNN model, which only achieved around 70% validation accuracy. A notable difference observed was the VGG16 model's superior generalization to the cat and dog data in the validation set, in contrast to the simple CNN model, which lagged with around 70% validation accuracy.", 'The sequential model was compiled using the Adam optimizer with a learning rate of 0.0001 and categorical cross entropy loss function. The sequential model was compiled using the Adam optimizer with a learning rate of 0.0001 and utilized categorical cross entropy as the loss function, maintaining consistency with previous models.']}], 'duration': 933.906, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI5834063.jpg', 'highlights': ['The VGG16 model achieved a training accuracy of 99% and a validation accuracy of 98% after just five epochs.', "The majority of the model's parameters are frozen, leaving only the last output layer as the trainable layer, resulting in 8000 trainable parameters in the model.", 'The pre-processing for VGG16 involves subtracting the mean RGB value computed on the training set from each pixel in the image, ensuring that new data is processed in the same way as the original training set.', 'The VGG16 model showed significant improvement in generalization compared to a simple CNN model, which only achieved around 70% validation accuracy.', 'The output layer of the VGG 16 model is originally designed for 1000 different ImageNet classes but is modified to predict only two output classes for cat and dog.']}, {'end': 7634.864, 'segs': [{'end': 7012.39, 'src': 'embed', 'start': 6983.774, 'weight': 0, 'content': [{'end': 6988.358, 'text': 'So overall, the model incorrectly predicted four samples.', 'start': 6983.774, 'duration': 4.584}, {'end': 6990.64, 'text': 'So that gives us 96 out of 100.', 'start': 6988.418, 'duration': 2.222}, {'end': 6995.204, 'text': "Correct, or let's see 96 correct predictions out of 100 total predictions.", 'start': 6990.64, 'duration': 4.564}, {'end': 7002.548, 'text': 'So that gives us an accuracy rate on our test set of 96%.', 'start': 6995.244, 'duration': 7.304}, {'end': 7012.39, 'text': 'Not surprising given what we saw in the last episode for the high level of accuracy that our model had on the validation set.', 'start': 7002.548, 'duration': 9.842}], 'summary': 'The model achieved a 96% accuracy rate on the test set, with 4 incorrect predictions out of 100.', 'duration': 28.616, 'max_score': 6983.774, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6983774.jpg'}, {'end': 7178.618, 'src': 'embed', 'start': 7127.304, 'weight': 1, 'content': [{'end': 7134.187, 'text': "the size of the full VGG 16 network that we've worked with in the past few episodes is about 553 megabytes on disk.", 'start': 7127.304, 'duration': 6.883}, {'end': 7145.817, 'text': 'So pretty large, generally speaking, the size of one of the currently largest mobile nets is only about 17 megabytes.', 'start': 7136.568, 'duration': 9.249}, {'end': 7152.644, 'text': "So that's a pretty huge difference, especially when you think about deploying a model to run on a mobile app, for example.", 'start': 7145.977, 'duration': 6.667}, {'end': 7159.888, 'text': 'This vast size difference is due to the number of parameters or weights and biases contained in the model.', 'start': 7153.084, 'duration': 6.804}, {'end': 7169.113, 'text': "So for example, let's see VGG 16, as we saw previously has about 138 million total parameters.", 'start': 7160.408, 'duration': 8.705}, {'end': 7170.334, 'text': 'So a lot.', 'start': 7169.753, 'duration': 0.581}, {'end': 7178.618, 'text': 'And the 17 megabyte mobile net that we talked about, which was the largest mobile net currently has only about 4.2 million parameters.', 'start': 7171.074, 'duration': 7.544}], 'summary': 'Vgg 16 network is 553mb, while largest mobile net is 17mb, with 138m and 4.2m parameters respectively.', 'duration': 51.314, 'max_score': 7127.304, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI7127304.jpg'}], 'start': 6768.55, 'title': 'Vgg16 model and mobile nets', 'summary': 'Discusses the use of a fine-tuned vgg16 model achieving 96% accuracy on a test set, and introduces mobile nets, highlighting their smaller size and faster speed compared to mainstream models, with a comparison of 553 megabytes for vgg 16 network and 17 megabytes for mobile nets, and a discussion on the trade-off between size, accuracy, and memory consumption.', 'chapters': [{'end': 7071.584, 'start': 6768.55, 'title': 'Fine-tuned vgg16 model inference', 'summary': 'Discusses using a fine-tuned vgg16 model to predict on a test set, achieving a 96% accuracy rate and comparing its performance with the original model built from scratch.', 'duration': 303.034, 'highlights': ['The model achieved an accuracy rate of 96% on the test set, performing better than the original model built from scratch. The model correctly predicted a dog 49 times for images that were truly dogs and a cat 47 times for images that truly were cats, with an overall 96% accuracy rate on the test set.', 'The chapter discusses the upcoming plan for more fine-tuning on a completely new data set using another well-known pre-trained model. The upcoming plan involves more fine-tuning than what was seen for VGG16, focusing on a completely new data set that was not included in the original data set it was trained on.', 'The episode emphasizes the availability of resources on blizzard.com and the deep lizard hive mind for accessing exclusive perks and rewards. The resources available for this episode on blizzard.com and the deep lizard hive mind offer exclusive perks and rewards for viewers.']}, {'end': 7634.864, 'start': 7071.925, 'title': 'Introduction to mobile nets', 'summary': 'Introduces mobile nets, a lightweight class of convolutional neural networks, emphasizing their smaller size and faster speed compared to mainstream models, with a comparison of 553 megabytes for vgg 16 network and 17 megabytes for mobile nets, and a discussion on the trade-off between size, accuracy, and memory consumption.', 'duration': 562.939, 'highlights': ['Mobile nets are much smaller and faster in size than mainstream models, with a comparison of 553 megabytes for VGG 16 network and 17 megabytes for mobile nets, making them suitable for mobile devices. Mobile nets are highlighted as smaller and faster in size, with VGG 16 network being 553 megabytes and mobile nets being 17 megabytes, showcasing their suitability for mobile devices.', 'The largest mobile net currently has only about 4.2 million parameters compared to about 138 million total parameters in VGG 16, resulting in a much smaller relative scale. The largest mobile net has about 4.2 million parameters, significantly smaller in a relative scale compared to VGG 16, which has about 138 million total parameters.', 'Mobile nets, while being faster and smaller, have a trade-off in accuracy compared to larger models like VGG 16, but the reduction in accuracy is relatively small. Mobile nets have a trade-off in accuracy compared to larger models like VGG 16, with a relatively small reduction in accuracy.']}], 'duration': 866.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI6768550.jpg', 'highlights': ['The model achieved an accuracy rate of 96% on the test set, outperforming the original model.', 'Mobile nets are much smaller and faster in size than mainstream models, with VGG 16 network being 553 megabytes and mobile nets being 17 megabytes.', 'The largest mobile net has about 4.2 million parameters, significantly smaller in a relative scale compared to VGG 16, which has about 138 million total parameters.']}, {'end': 8675.111, 'segs': [{'end': 7681.441, 'src': 'embed', 'start': 7654.521, 'weight': 0, 'content': [{'end': 7660.263, 'text': 'So between these top three classes that it predicted, this is almost 100%.', 'start': 7654.521, 'duration': 5.742}, {'end': 7664.384, 'text': 'Between the three of these, I would say mobile net did a pretty good job on this prediction.', 'start': 7660.263, 'duration': 4.121}, {'end': 7666.784, 'text': "So let's move on to number two.", 'start': 7664.744, 'duration': 2.04}, {'end': 7671.145, 'text': 'Alright, so now we are going to plot our second image.', 'start': 7667.364, 'duration': 3.781}, {'end': 7678.227, 'text': 'And this is a cup of Well, I originally thought that it was espresso.', 'start': 7671.885, 'duration': 6.342}, {'end': 7681.441, 'text': 'And then someone called it a cup of cappuccino.', 'start': 7678.86, 'duration': 2.581}], 'summary': 'Mobile net accurately predicted top three classes, achieving almost 100% accuracy.', 'duration': 26.92, 'max_score': 7654.521, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI7654521.jpg'}, {'end': 7966.207, 'src': 'embed', 'start': 7921.857, 'weight': 1, 'content': [{'end': 7927.339, 'text': "So it didn't take a lot of fine tuning at all to get it to perform well on our cat and dog data set.", 'start': 7921.857, 'duration': 5.482}, {'end': 7931.423, 'text': "Now with mobile net, we'll be going through some fine tuning steps as well.", 'start': 7927.899, 'duration': 3.524}, {'end': 7938.351, 'text': "But this time we'll be working with a data set that is completely different from the original image net library,", 'start': 7931.944, 'duration': 6.407}, {'end': 7940.453, 'text': 'for which mobile net was originally trained on.', 'start': 7938.351, 'duration': 2.102}, {'end': 7946.68, 'text': "This new data set that we'll be working with is a data set of images of sign language digits.", 'start': 7940.853, 'duration': 5.827}, {'end': 7958.224, 'text': 'There are 10 classes total for this data set, ranging from zero to nine, where each class contains images of the particular sign for that digit.', 'start': 7947.06, 'duration': 11.164}, {'end': 7966.207, 'text': "This data set is available on Kaggle as grayscale images, but it's also available on GitHub as RGB images.", 'start': 7958.704, 'duration': 7.503}], 'summary': 'Mobile net performs well on cat and dog data. fine-tuning for sign language digits with 10 classes.', 'duration': 44.35, 'max_score': 7921.857, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI7921857.jpg'}, {'end': 8133.381, 'src': 'embed', 'start': 8108.088, 'weight': 3, 'content': [{'end': 8115.411, 'text': 'across the classes zero through nine, the there are anywhere from 204 to 208 samples in each class.', 'start': 8108.088, 'duration': 7.323}, {'end': 8121.973, 'text': 'And then here I have just an explanation of how your data should be structured up to this point.', 'start': 8115.931, 'duration': 6.042}, {'end': 8127.235, 'text': 'Now the rest of the organization that we will do programmatically with this script here.', 'start': 8122.493, 'duration': 4.742}, {'end': 8133.381, 'text': 'So this script is going to organize the data into train valid and test directories.', 'start': 8127.935, 'duration': 5.446}], 'summary': 'Data consists of 204-208 samples in each class, to be organized into train, valid, and test directories.', 'duration': 25.293, 'max_score': 8108.088, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8108088.jpg'}, {'end': 8428.207, 'src': 'embed', 'start': 8376.473, 'weight': 4, 'content': [{'end': 8380.096, 'text': 'And then similarly, we did the same thing for the test directory.', 'start': 8376.473, 'duration': 3.623}, {'end': 8388.061, 'text': 'And then, once we look in here, we can see that the test directory has five samples for zero.', 'start': 8380.876, 'duration': 7.185}, {'end': 8391.964, 'text': 'we see that it has five samples for one.', 'start': 8388.061, 'duration': 3.903}, {'end': 8396.447, 'text': 'if we go check out the valid directories, look at zero.', 'start': 8391.964, 'duration': 4.483}, {'end': 8397.868, 'text': 'it should have 30 zeros.', 'start': 8396.447, 'duration': 1.421}, {'end': 8401.339, 'text': 'So we see that here 30.', 'start': 8399.659, 'duration': 1.68}, {'end': 8405.901, 'text': 'So every valid directory has 30 samples.', 'start': 8401.339, 'duration': 4.562}, {'end': 8411.702, 'text': 'And the training directory classes have not necessarily uniform samples.', 'start': 8406.421, 'duration': 5.281}, {'end': 8419.605, 'text': 'Because remember, we saw that the number of samples in each class range anywhere from 204 to 209, I think.', 'start': 8411.762, 'duration': 7.843}, {'end': 8428.207, 'text': 'So the the number of images within each class directory for the training sample will differ slightly by maybe one or two images.', 'start': 8420.145, 'duration': 8.062}], 'summary': 'The test directory has 5 samples for zero and one, while the valid directory contains 30 samples for zero. the training directory has varying samples per class, ranging from 204 to 209 images.', 'duration': 51.734, 'max_score': 8376.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8376473.jpg'}, {'end': 8576.065, 'src': 'embed', 'start': 8547.802, 'weight': 6, 'content': [{'end': 8551.045, 'text': 'saying where our training data resides on disk.', 'start': 8547.802, 'duration': 3.243}, {'end': 8555.708, 'text': 'we are setting the target size to 224 by 224, which, recall,', 'start': 8551.045, 'duration': 4.663}, {'end': 8564.275, 'text': 'just resizes any training data to be a height or to have a height of 224 and a width of 224..', 'start': 8555.708, 'duration': 8.567}, {'end': 8571.561, 'text': 'Since that is the image size that mobile net expects, and we are setting our batch size equal to 10.', 'start': 8564.275, 'duration': 7.286}, {'end': 8576.065, 'text': "So we've got the same deal for valid batches and for test batches as well.", 'start': 8571.561, 'duration': 4.504}], 'summary': 'Setting training data to 224x224, batch size 10.', 'duration': 28.263, 'max_score': 8547.802, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8547802.jpg'}], 'start': 7635.384, 'title': 'Fine-tuning mobilenet and data set preprocessing', 'summary': "Evaluates mobilenet's image classification performance, achieving almost 100% accuracy in predicting top three classes, and fine-tunes it for a custom dataset. it also covers organizing sign language digits data and dataset preprocessing, resulting in 1702 training, 300 validation, and 50 testing images.", 'chapters': [{'end': 7940.453, 'start': 7635.384, 'title': 'Fine tuning mobilenet with custom dataset', 'summary': 'Discusses the performance of mobilenet in classifying images, with the model predicting the top three classes with almost 100% accuracy, and later achieving 99% probability for correctly identifying an espresso and a strawberry, indicating the potential for fine-tuning the model for a custom dataset.', 'duration': 305.069, 'highlights': ['Performance of MobileNet in Image Classification MobileNet predicts top three classes with almost 100% accuracy, achieving 99% probability for correctly identifying an espresso and a strawberry, indicating strong potential for further fine-tuning the model for a custom dataset.', "Accuracy of MobileNet Predictions MobileNet predicts 99% probability for correctly identifying an espresso, with the other four predictions being well under 1%, showcasing the model's accuracy and reliability in image classification.", 'Fine-Tuning MobileNet with Custom Dataset The episode hints at fine-tuning MobileNet with a custom dataset, different from the original ImageNet library, indicating a more intensive fine-tuning process compared to previous attempts with VGG 16.']}, {'end': 8343.311, 'start': 7940.853, 'title': 'Organizing sign language digits data', 'summary': 'Explains the process of organizing a data set of images of sign language digits into train, validation, and test directories, as well as the specific steps involved in this process, such as moving and sampling images from different directories.', 'duration': 402.458, 'highlights': ['The data set consists of images of sign language digits divided into 10 classes, with each class containing images of a particular sign for a digit. The data set includes 10 classes in total, with each class containing images of a specific sign for a digit.', 'The data set is available as grayscale images on Kaggle and as RGB images on GitHub, with the tutorial focusing on using the RGB images. The data set is available in both grayscale and RGB formats, with the tutorial specifically using the RGB images.', 'The script organizes the data into train, valid, and test directories, with each class containing a varying number of samples, ranging from 204 to 208 images per class. The script organizes the data into separate directories for training, validation, and testing, with each class having a different number of samples, ranging from 204 to 208 images per class.', 'The process involves moving directories labeled zero through nine into the train directory, creating corresponding directories within the valid and test directories for each class, and then sampling and moving images from the training set to the validation and test sets. The process includes moving class directories into the train directory, creating matching directories in the valid and test directories for each class, and randomly sampling and moving images from the training set to the validation and test sets.']}, {'end': 8675.111, 'start': 8343.912, 'title': 'Data set preprocessing', 'summary': 'Explains the process of restructuring and preprocessing a dataset to have uniform samples for validation and test directories, and then setting up directory iterators to prepare for building and fine-tuning a model, resulting in 1702 images for training, 300 images for validation, and 50 images for testing.', 'duration': 331.199, 'highlights': ['The test directory has 5 samples for each of the classes, whereas the valid directory has 30 samples for each class, resulting in uniform samples for validation and test directories.', 'The training directory classes have a slightly varying number of samples, ranging from 204 to 209, resulting in 1702 images for training.', 'Setting the target size to 224x224 and the batch size to 10 for the training, validation, and test sets, and ensuring shuffle equals false only for the test set for appropriate plotting of prediction results to a confusion matrix.']}], 'duration': 1039.727, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI7635384.jpg', 'highlights': ['MobileNet achieves almost 100% accuracy in predicting top three classes', 'Fine-tuning MobileNet with a custom dataset is indicated for a more intensive process', 'The dataset consists of sign language digits divided into 10 classes', 'The script organizes the data into separate directories for training, validation, and testing', 'The test directory has 5 samples for each class, and the valid directory has 30 samples for each class', 'The training directory classes have a slightly varying number of samples, resulting in 1702 images for training', 'Setting the target size to 224x224 and the batch size to 10 for the training, validation, and test sets']}, {'end': 10050.604, 'segs': [{'end': 8780.819, 'src': 'embed', 'start': 8699.171, 'weight': 1, 'content': [{'end': 8707.68, 'text': "So first thing we're going to do is we are going to import mobile net, just as we did in the first mobile net episode, by calling tf dot.", 'start': 8699.171, 'duration': 8.509}, {'end': 8708.66, 'text': 'charis dot.', 'start': 8707.68, 'duration': 0.98}, {'end': 8709.861, 'text': 'applications dot mobile net.', 'start': 8708.66, 'duration': 1.201}, {'end': 8710.581, 'text': 'dot mobile net.', 'start': 8709.861, 'duration': 0.72}, {'end': 8716.884, 'text': 'Remember, if this is your first time running this line, then you will need an internet connection to download it from the internet.', 'start': 8711.121, 'duration': 5.763}, {'end': 8720.726, 'text': "Now let's just take a look at the model that we downloaded.", 'start': 8717.324, 'duration': 3.402}, {'end': 8731.533, 'text': 'So by calling model dot summary, we have this output here that is showing us all of these lovely layers included in mobile net.', 'start': 8721.287, 'duration': 10.246}, {'end': 8737.715, 'text': 'So this is just to get a general idea of the model because we will be fine tuning it.', 'start': 8731.993, 'duration': 5.722}, {'end': 8749.538, 'text': 'So the fine tuning process now is going to start out with us getting all of the layers up to the sixth to last layer.', 'start': 8738.655, 'duration': 10.883}, {'end': 8755.635, 'text': 'So, if we scroll up and look at our output 123456,', 'start': 8750.219, 'duration': 5.416}, {'end': 8763.903, 'text': 'So we are going to get all of the layers up to this layer and everything else is not going to be included.', 'start': 8755.635, 'duration': 8.268}, {'end': 8773.032, 'text': 'So all of these layers are what we are going to keep and transfer into a new model, our new fine tune model,', 'start': 8764.684, 'duration': 8.348}, {'end': 8776.135, 'text': 'and we are not going to include these last five layers.', 'start': 8773.032, 'duration': 3.103}, {'end': 8780.819, 'text': 'And this is just a choice that I came to after doing a little experimenting and testing.', 'start': 8776.655, 'duration': 4.164}], 'summary': 'Imported mobilenet model, examined layers, and defined fine-tuning process.', 'duration': 81.648, 'max_score': 8699.171, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8699171.jpg'}, {'end': 9005.834, 'src': 'embed', 'start': 8978.567, 'weight': 5, 'content': [{'end': 8982.73, 'text': "But basically what we're doing here is we're going through all the layers in the model.", 'start': 8978.567, 'duration': 4.163}, {'end': 8985.591, 'text': 'And by default, they are all trainable.', 'start': 8983.33, 'duration': 2.261}, {'end': 8991.627, 'text': "we're saying that we want only the last 23 layers to be trainable.", 'start': 8987.185, 'duration': 4.442}, {'end': 8997.01, 'text': 'All the layers except for the last 23 make those not trainable.', 'start': 8992.208, 'duration': 4.802}, {'end': 9005.834, 'text': 'And just so that you understand, relatively speaking, there are 88 total layers in the original mobile net model.', 'start': 8997.67, 'duration': 8.164}], 'summary': '23 out of 88 layers in the model are set to be trainable.', 'duration': 27.267, 'max_score': 8978.567, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8978567.jpg'}, {'end': 9075.856, 'src': 'embed', 'start': 9052.199, 'weight': 4, 'content': [{'end': 9059.442, 'text': 'So all the layers below the global average pooling layer that we previously saw in the original mobile net summary are now gone.', 'start': 9052.199, 'duration': 7.243}, {'end': 9064.266, 'text': 'And instead of an output layer with 1000 classes,', 'start': 9060.062, 'duration': 4.204}, {'end': 9075.856, 'text': 'we now have an output layer with 10 classes from the or corresponding to the 10 potential output classes that we have for our new sign language digits data set.', 'start': 9064.266, 'duration': 11.59}], 'summary': 'Modified model has 10 output classes for sign language digits.', 'duration': 23.657, 'max_score': 9052.199, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI9052199.jpg'}, {'end': 9257.171, 'src': 'embed', 'start': 9230.749, 'weight': 0, 'content': [{'end': 9235.967, 'text': 'our training accuracy actually starts out at 74% among 10 classes.', 'start': 9230.749, 'duration': 5.218}, {'end': 9239.388, 'text': 'So that is not bad for a starting point.', 'start': 9236.047, 'duration': 3.341}, {'end': 9246.01, 'text': 'And we quickly get to 100% on our training accuracy just within four epochs.', 'start': 9240.509, 'duration': 5.501}, {'end': 9247.15, 'text': "So that's great.", 'start': 9246.53, 'duration': 0.62}, {'end': 9252.272, 'text': "But you can see that at that point, we're only at 81% accuracy for our validation set.", 'start': 9247.211, 'duration': 5.061}, {'end': 9257.171, 'text': 'So we have a decent amount of overfitting going on earlier on here.', 'start': 9252.608, 'duration': 4.563}], 'summary': 'Training accuracy starts at 74%, reaches 100% in 4 epochs, but validation accuracy lags at 81%, indicating overfitting.', 'duration': 26.422, 'max_score': 9230.749, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI9230749.jpg'}, {'end': 9512.249, 'src': 'embed', 'start': 9478.323, 'weight': 6, 'content': [{'end': 9483.608, 'text': 'however, only four out of five times did the model correctly predict.', 'start': 9478.323, 'duration': 5.285}, {'end': 9485.631, 'text': 'looks like one of the times.', 'start': 9483.608, 'duration': 2.023}, {'end': 9491.877, 'text': "the model, let's see, predicted a one when it should have been an eight.", 'start': 9485.631, 'duration': 6.246}, {'end': 9499.98, 'text': "But in total, we've got 12345 incorrect predictions out of 50 total.", 'start': 9492.658, 'duration': 7.322}, {'end': 9512.249, 'text': 'So that gives us a 90% accuracy rate on our test set, which is not surprising for us given the accuracy that we saw right above on our validation set.', 'start': 9500.28, 'duration': 11.969}], 'summary': 'Model achieved 90% accuracy with 12345 incorrect predictions out of 50 total.', 'duration': 33.926, 'max_score': 9478.323, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI9478323.jpg'}, {'end': 9630.493, 'src': 'embed', 'start': 9585.938, 'weight': 8, 'content': [{'end': 9591.12, 'text': "For the example that we'll demonstrate in just a moment, the data we'll be working with is image data.", 'start': 9585.938, 'duration': 5.182}, {'end': 9600.125, 'text': 'And so for image data, specifically, data augmentation would include things like flipping the image, either horizontally or vertically.', 'start': 9591.761, 'duration': 8.364}, {'end': 9607.095, 'text': 'It could include rotating the image, it could include changing the color of the image, and so on.', 'start': 9600.774, 'duration': 6.321}, {'end': 9614.057, 'text': "One of the major reasons we'd want to use data augmentation is to simply just get access to more data.", 'start': 9607.735, 'duration': 6.322}, {'end': 9619.318, 'text': 'So a lot of times not having access to enough data is an issue that we can run into.', 'start': 9614.517, 'duration': 4.801}, {'end': 9625.119, 'text': 'And we can run into problems like overfitting if our training data set is too small.', 'start': 9619.918, 'duration': 5.201}, {'end': 9630.493, 'text': 'So that is a major reason to use data augmentation is to just grow our training set.', 'start': 9625.529, 'duration': 4.964}], 'summary': 'Data augmentation expands image data to prevent overfitting and increase training set size.', 'duration': 44.555, 'max_score': 9585.938, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI9585938.jpg'}], 'start': 8675.772, 'title': 'Fine-tuning mobilenet and data augmentation', 'summary': "Discusses fine-tuning mobilenet for a custom dataset, achieving 100% accuracy on the training set and 92% accuracy on the validation set after 30 epochs, as well as creating a functional model with 88 layers and using data augmentation with tensorflow's keras api to reduce overfitting and generate more training data.", 'chapters': [{'end': 8801.299, 'start': 8675.772, 'title': 'Fine tuning mobilenet', 'summary': 'Discusses the process of fine-tuning mobilenet for a custom data set, involving importing mobilenet, examining the model, and determining which layers to include in the fine-tuned model.', 'duration': 125.527, 'highlights': ["Importing MobileNet model using tf applications.mobileNet, requiring internet connection if running for the first time. The process involves importing MobileNet model by calling tf.applications.mobileNet.mobileNet, which requires an internet connection if it's the first time running this line.", 'Examining the model using model.summary to view all the included layers in MobileNet. The chapter demonstrates examining the model by calling model.summary to display all the layers included in MobileNet.', 'Determining the layers to include in the new fine-tune model, keeping all layers up to the sixth to last layer and excluding the last five layers. The process includes determining the layers to include in the new fine-tune model by keeping all layers up to the sixth to last layer and excluding the last five layers based on experimentation and testing.']}, {'end': 9075.856, 'start': 8801.879, 'title': 'Creating and fine-tuning a functional model', 'summary': 'Discusses creating a functional model by adding an output layer with 10 units and fine-tuning the model by freezing all except for the last 23 layers, having 88 total layers in the original mobile net model, to yield improved results.', 'duration': 273.977, 'highlights': ['The new model ends with a global average pooling 2d layer, replacing the original 1000-class output layer with a 10-class output layer for the sign language digits dataset.', 'Freezing all except the last 23 layers in the model, out of the total 88 layers in the original mobile net model, results in improved performance compared to training only the output layer.']}, {'end': 9512.249, 'start': 9076.474, 'title': 'Fine tuning mobilenet model', 'summary': 'Covers fine-tuning a mobilenet model on a new dataset, achieving 100% accuracy on the training set and 92% accuracy on the validation set after 30 epochs, with a subsequent analysis of overfitting and a 90% accuracy rate on the test set.', 'duration': 435.775, 'highlights': ['The model achieved 100% accuracy on the training set and 92% accuracy on the validation set after 30 epochs. The model achieved 100% accuracy on the training set and 92% accuracy on the validation set after 30 epochs, showing good performance on a new dataset.', "A 90% accuracy rate was achieved on the test set, with 5 incorrect predictions out of 50 total. The test set yielded a 90% accuracy rate, with only 5 incorrect predictions out of 50 total, indicating the model's effectiveness on unseen data.", 'Initial overfitting was observed, with the training accuracy starting at 74% and quickly reaching 100%, while the validation accuracy lagged behind. Initial overfitting was observed, with the training accuracy starting at 74% and quickly reaching 100%, while the validation accuracy lagged behind, indicating the need for overfitting mitigation strategies.']}, {'end': 10050.604, 'start': 9512.739, 'title': "Data augmentation with tensorflow's keras api", 'summary': "Discusses how to use data augmentation on images using tensorflow's keras api, emphasizing its importance in generating more training data and reducing overfitting, while explaining the process and benefits of using image data generator for augmentation.", 'duration': 537.865, 'highlights': ['The importance of data augmentation in generating more training data and reducing overfitting Data augmentation helps to address the issue of not having enough data by creating new data from existing data, which in turn reduces overfitting by expanding the training set.', 'Explanation of image data augmentation techniques such as flipping, rotating, and changing color The chapter explains that for image data, data augmentation involves techniques like flipping, rotating, changing color, and more, which helps in creating diverse training data for models.', "Demonstration of using TensorFlow's image data generator for augmentation The chapter demonstrates the use of TensorFlow's image data generator to specify parameters like rotation range, width shift, height shift, shear range, zoom range, and horizontal flip for augmenting image data.", 'Example of applying data augmentation to a random image from the dog directory An example is presented where data augmentation techniques are applied to a random image from the dog directory, showcasing the impact of techniques like rotation, width shift, and flipping on the images.', "Importance of data augmentation for creating a more dynamic and diverse training set The chapter emphasizes the significance of data augmentation in creating a more dynamic training set, using the example of ensuring images of dogs facing in different directions to improve the model's generalization."]}], 'duration': 1374.832, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qFJeN9V1ZsI/pics/qFJeN9V1ZsI8675772.jpg', 'highlights': ['Achieved 100% accuracy on training set and 92% accuracy on validation set after 30 epochs', 'Imported MobileNet model using tf applications.mobileNet, requiring internet connection if running for the first time', 'Examined the model using model.summary to view all the included layers in MobileNet', 'Determined the layers to include in the new fine-tune model, keeping all layers up to the sixth to last layer and excluding the last five layers', 'The new model ends with a global average pooling 2d layer, replacing the original 1000-class output layer with a 10-class output layer for the sign language digits dataset', 'Freezing all except the last 23 layers in the model, out of the total 88 layers in the original mobile net model, results in improved performance compared to training only the output layer', 'A 90% accuracy rate was achieved on the test set, with 5 incorrect predictions out of 50 total', 'Initial overfitting was observed, with the training accuracy starting at 74% and quickly reaching 100%, while the validation accuracy lagged behind, indicating the need for overfitting mitigation strategies', 'The importance of data augmentation in generating more training data and reducing overfitting', 'Explanation of image data augmentation techniques such as flipping, rotating, and changing color', "Demonstration of using TensorFlow's image data generator for augmentation", 'Importance of data augmentation for creating a more dynamic and diverse training set']}], 'highlights': ['A keras with tensorflow course covers data preprocessing, neural network training, and model inference achieving 94% accuracy; fine-tuning vgg16 model for cat and dog classification with 99% training accuracy and 98% validation accuracy; and discusses mobilenets, achieving 100% accuracy on training set and 92% on validation set after 30 epochs.', 'The fit function in the Keras API expects input data (x) in NumPy array format and corresponding labels (y) in the same format for training the model.', 'The model achieved a 94% accuracy after 30 epochs of training, demonstrating the effectiveness of the Keras model.', 'The model is validated against the test set to ensure it generalizes well before deployment to production.', 'Covers the various methods for saving and loading a Keras sequential model, emphasizing the different options available and the importance of having the model already created in the Jupyter Notebook.', 'Specifying image sizes, classes, and batch sizes for training, validation, and test data sets resulted in 1000 images for training, 200 images for validation, and 100 images for testing.', 'The VGG16 model achieved a training accuracy of 99% and a validation accuracy of 98% after just five epochs.', 'The model achieved an accuracy rate of 96% on the test set, outperforming the original model.', 'MobileNet achieves almost 100% accuracy in predicting top three classes', 'Achieved 100% accuracy on training set and 92% accuracy on validation set after 30 epochs']}