In this section, we will carry out an experiment by inserting an additional convolutional layer into the generator network, as well as in the discriminator network. Through this experiment, we will convey performance optimization tips and best practices.
Performance optimization tips and best practices
Changes in the generator and discriminator network
The changes in the generator network are shown in the following code:
# Generator network
gi <- layer_input(shape = l)
go <- gi %>% layer_dense(units = 32 * 14 * 14) %>%
layer_activation_leaky_relu() %>%
layer_reshape(target_shape = c(14, 14, 32)) %>%
layer_conv_2d(filters = 32,
kernel_size = 5,
...