From the course: Deep Learning: Image Recognition

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Loading an image data set

Loading an image data set - Python Tutorial

From the course: Deep Learning: Image Recognition

Start my 1-month free trial

Loading an image data set

- [Instructor] To train a neural network we need a set of training images. Let's write the code to load and pre process our training images so they're in the right format to feed into a neural network. Let's go ahead and open up 03 loading image dataset.py. For this neural network we'll be using the cifar10 data set. Since the cifar10 data set is used so often, Keras provides a function for easily accessing it. Here on line eight to load the data we'll call cifar10.loaddata. This function returns four different arrays. First it returns an x and y array of training data. So we'll say x_train,y_train=that function call. The x array will contain the actual images from the data set. The y array contains the matching label for each image. The function also returns an x and y array of test data. So we'll add x_test, and y_test. The test data is in the same format as the training data, it's just additional images that we can use to test the neural network to make sure it's performing well…

Contents