Developing a deep learning model architecture

Developing the architecture of a model involves defining various items, such as the type and number of layers for the network, the type of activation function, the number of units or neurons to use in the network, and also providing the data-related input/output values. An example of specifying a simple sequential model architecture using Keras in R is shown in the following code:

# Model architecturemodel <- keras_model_sequential() model %>%  layer_dense(units = 8, activation = 'relu', input_shape = c(21)) %>%  layer_dense(units = 3, activation = 'softmax')

Note that a sequential model allows us to develop models layer by layer. As seen from the preceding code, two layers of densely connected ...

Get Advanced Deep Learning with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.