For our walk-through workshop, we'll be creating a classification network. This network takes advantage of reinforcement learning, which is when we use the labels for corresponding pictures in the dataset to train the model. This idea might seem confusing at first, but we'll elaborate on it more as we walk through the code.
This network in particular is a convolutional neural network, which is particulary designed for computer vision. Today, we'll be harnassing the power of neural networks to classify pictures of clothing into shirts, trousers, dresses, coats, bags and more!
Every neural network's performance depends on the dataset it trains on. The dataset is what turns a program from a simple algorithm into a neural network.
The dataset we will use is called the Fasion MNIST dataset. The dataset contains over a hundred pictures of various articles of clothing. This data can be found on Kaggle, which is a website that stores many datasets that can be used to classify various kinds of models.
Link to Kaggle (feel free to explore later!)
Although this dataset it pretty easy to use, we need some tools to help us access and manipulate the data.
import tensorflow as tf
import numpy as np
import os
import disutils
I'll be quickly explaining each of these packages
This dataset was initially just a collection of images. In a process known as data-cleaning, we resize all the images, associate them with their respective labels, and transform them into numerical data. From now, we'll be referring to the images as X, and their corresponding labels as Y. This process has already been done for us, however, we need to seperate the images into training and testing data.
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion.mnist.load_data()
The training data is what we'll use to train the model, and test data is what we'll use to determine how accurate the model is after training.