February 2020
Intermediate to advanced
328 pages
8h 19m
English
We have converted images in the CIFAR-10 dataset into grayscale. Now, let's build an autoencoder to colorize them:
# network parametersinput_shape = c(img_height, img_width, 1)batch_size = 32kernel_size = 3latent_dim = 256
Next, we create an input layer of the autoencoder:
inputs = layer_input(shape = input_shape,name = "encoder_input")
x = inputsx <- x %>% layer_conv_2d(filters = 64,kernel_size = kernel_size,strides = 2, activation = "relu",padding = "same") %>% layer_conv_2d(filters = 128,kernel_size = kernel_size,strides = 2, activation = "relu",padding ...
Read now
Unlock full access