The discriminator network will be used for classifying fake and real images. The architecture and summary of the network will be discussed in this section.
Developing the discriminator network
Architecture
The code that's used for developing the discriminator network architecture is as follows:
# Discriminator network
di <- layer_input(shape = c(h, w, c))
do <- di %>%
layer_conv_2d(filters = 64, kernel_size = 4) %>%
layer_activation_leaky_relu() %>%
layer_flatten() %>%
layer_dropout(rate = 0.3) %>%
layer_dense(units = 1, activation = "sigmoid")
d <- keras_model(di, do)
From the preceding code, we can observe the following:
- We provided an input...