Advanced Deep Learning with R by Bharatendra Rai

Advanced Deep Learning with R by Bharatendra Rai

Author:Bharatendra Rai [Bharatendra Rai]
Language: eng
Format: epub
Tags: COM042000 - COMPUTERS / Natural Language Processing, COM016000 - COMPUTERS / Computer Vision and Pattern Recognition, COM044000 - COMPUTERS / Neural Networks
Publisher: Packt Publishing
Published: 2019-12-17T10:43:29+00:00


At the time of training the autoencoder network, we will use these clean images as output. Next, we will specify the encoder model architecture.

Encoder model

For the encoder model, we will use three convolutional layers with 512, 512, and 256 filters, as shown in the following code:

# Encoder network

input_layer <- layer_input(shape = c(128,128,3))

encoder <- input_layer %>%

layer_conv_2d(filters = 512, kernel_size = c(3,3), activation = 'relu', padding = 'same') %>%

layer_max_pooling_2d(pool_size = c(2,2),padding = 'same') %>%

layer_conv_2d(filters = 512, kernel_size = c(3,3), activation = 'relu', padding = 'same') %>%

layer_max_pooling_2d(pool_size = c(2,2),padding = 'same') %>%

layer_conv_2d(filters = 256, kernel_size = c(3,3), activation = 'relu', padding = 'same') %>%

layer_max_pooling_2d(pool_size = c(2,2), padding = 'same')

summary(encoder)

Output

Tensor("max_pooling2d_22/MaxPool:0", shape=(?, 16, 16, 256), dtype=float32)

Here, the encoder network is 16 x 16 x 256 in size. We will keep the other features similar to the encoder models that we used in the previous two examples. Now, we will specify the decoder architecture of the autoencoder network.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.