February 2020
Intermediate to advanced
328 pages
8h 19m
English
In this example, we will use the CIFAR-10 dataset, which consists of color images of a size of 32x32. There are 50,000 training images and 10,000 test images. We will preprocess its images to grayscale and then build an autoencoder to color them.
Let's first load the required libraries into the environment:
library(keras)library(wvtool)library(grid)library(abind)
We load the training and testing datasets and store them into variables:
data <- dataset_cifar10()x_train = data$train$xx_test = data$test$x
Let's store relevant dimension data into respective variables:
num_images = dim(x_train)[1]num_images_test = dim(x_test)[1]img_width = dim(x_train)[2]img_height = dim(x_train)[3]
Let's convert all of ...
Read now
Unlock full access