A lot of the gold will remain the same.
The first step is to activate a library of guitars so it underscored you can check in packages that
this is taped.
Then we import our fashion amnesty data.
Since fashion amnesty is an inbuilt dataset, this can be imported from the US library in the later
part of the cause.
We'll also learn how to import images and external data.
So the data set is loaded and this variable faction amnesty, you can see that here is our dataset.
We have discussed about this dataset in the previous section.
I'll briefly tell you about this dataset.
This dataset has two parts printed and tested.
Trading has 60000 examples of twenty eight by twenty eight pixel images.
All of these images are black and white.
That is, these are grayscale images.
Only one Daniloff color in the vye variable or the variable to be predicted is a single erry and it
has values from zero to nine.
So there are 10 object.
Zero represents one object.
One represents one object.
And so on.
So there are 10 object which are represented by zero to nine digit.
Similarly, in the test set, there are 10000 images of twenty eight by twenty eight pixels.
And the output variable is the class of that image.
First of all, we will segregate the two parts.
So we will store the information of training and train images and train labels and stored information
of testing and test images and these labels.
So you can see here, test images contains the information of only the images.
Best Labels contains the information of what is the class of the object of which that image is.
We are also creating this array of class names because in the labels we have value 029 Those 029 are
encoded in digits.
These are the actual values or actual objects in that image.
So if we see zero there, it actually means that there is a t shirt in that image.
If we see one, it means a trouser.
So later on, when we predict the object in the image, we like to see the name of that image also.
So for that purpose, I've created this array of class names.
All of this is similar to the previous one.
There's nothing new we have done a lot to step also, which is processing the data in which we have
divided all the pixel values by 250 feet to normalize them.
Although the process of normalizing it is a little bit different.
But since in these images, we have only pixel data, which is homogeneous data across all the rows
and columns.
So we can straightaway divide by 255 to get values between zero and one.
So we are dividing the information by 255.
Then we are creating a validation dataset also.
So there are three datasets that we will have.
One is the path train images.
So it is a partition of training set which will be actually used to train the model.
Then there will be a validation data set of validation.
Data set is used to the only hybrid barometer's, although we will not be doing the type of parameters.
As of now, CNN have a lot of hyper parameters.
So when we try to tune them, a validation dataset is used here.
I'm showing you how the user validation does it.
And the third part will be dataset, which is already created.
And it has 10000 observations.
So in this part, we will be creating two partitions of the training data.
First, 5000 will be stored in the validation take and the rest 55000 will be stored in the partition
of training images.
So now part brain images and part time labels is to be used for training the model value images and
that labels will be used to look at the validation accuracy.
And finally, we will check the accuracy on test images and test labels.
So all this will same as before, but now comes the part where it is different from the previous model.
So this first difference is the input that we are giving into our model, is it 28 by 28 pixel image?
So there are two dimensions to each of the image.
28 by 28.
And we have a batch of 55000 images in our dining set.
So that is the third dimension to our dataset.
But at Convolutional, it takes an additional parameter of Jenelle's.
So a grayscale image.
As I told you earlier, has only one channel.
If you had a RGV image that is a color image, then you'd have to specify three here.
So there is an additional parameter of number of channels in the image.
So since currently the structure of our images is three dimensional, 55000 by 28 by 28.
I reship this Eddie and add one more dimension of the channels.
This I have to do for all the trees dataset part training, images, validation, images and test images.
I hope you understand why we have these here, these images.
We need to include the information of the number of channels also.
So this prepares our data.
Now we have to start building our model.