Neural Network with Clothing Classification Example

Data scientists use neural networks as a tool to analyze photos and images. A neural network is a machine learning tool used to analyze images. It tries to focus on essential features of an image and determine a value or class to it. In this case, we will go through an example of classifying clothes.

Description

The dataset used in this example is available through TensorFlow. The code for this page was used as I went through a Coursera course Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and Deep Learning. The code is in Python.

Code

Import Packages

#Import packages
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt

The main package used in this code is TensorFlow.

Read in the Data

The dataset is available in the TensorFlow package.

#Read in the data
df = tf.keras.datasets.fashion_mnist
#Dataset include images of fashion clothing

Load Training and Test Datasets

Load the data into training and test data. The data has the images and the corresponding labels for the clothing items.

Read More