How it works...

Let's take a look at what we did in the earlier recipe. In step 2, we downloaded the CIFAR-10 dataset from the link mentioned in case it is not present in the given link or working directory. In step 3, the unzipped files are loaded in the R environment as train and test datasets. The train dataset has a list of 50,000 images and the test dataset has a list of 10,000 images along with their labels. Then, in step 4, the train and test datasets are flattened into a list of two dataframes: one with input variables (or images) of length 3,072 (1,024 of red, 1,024 of green, and 1,024 of blue) and the other with output variables (or labels) of length 10 (binary for each class). In step 5, we perform sanity checks for the created train and test datasets by generating plots. The following figure shows a set of six train images along with their labels. Finally, in step 6, the input data is transformed using the min-max standardization technique. An example of categories from the CIFAR-10 dataset is shown in the following figure:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset