In this section, we will develop model architecture and then compile the model. We will also carry out calculations to compare the convolutional network with a fully connected network. Let's get started by specifying the model architecture.
Layers in the convolutional neural networks
Model architecture and related calculations
We start by creating a model using the keras_model_sequential function. The codes used for the model architecture are given as follows:
# Model architecture
model <- keras_model_sequential()
model %>%
layer_conv_2d(filters = 32,
kernel_size = c(3,3),
activation = 'relu',
input_shape = c(28,28,1)) %>...