Get started with deep learning under 5-minutes



Original Source Here

I have embarked on a journey to learn about deep learning. “For the things we have to learn before we can do them, we learn by doing them.” — Aristotle.

First, we find a dataset. Kaggle has a fantastic collection of datasets. Next, we select the fruits dataset to keep it simple.

After extracting the dataset, we select folders of fruits of importance, apples and banana. Now we have to train our Convolutional Neural Network (CNN) to be able to classify 🍎and 🍌.

Before we start training, we further divide our dataset into two folders, training set, and validation set.

After we have data prepared and ready for training, time to select a model architecture. We would be using VGG16 instead of building from a new model architecture from scratch. We have to modify last few layers of VGG16 model to incorporate our problem requirements of binary classification, 🍎 or 🍌

We set VGG16 layers to trainable=False to avoid updating VGG16 existing weights. We will only train last layer with our dataset, in buzzword 🐝 language, we will transfer learn.

After we finish training, we save the model as h5 file. Next, we can load the trained model from h5 file and infer classification for our 🍎 and 🍌test dataset.

🎉 Tada, we have our own deep learning model to classify between apples and bananas.

AI/ML

Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: