In this section, we will compile the model and then train the model using the fit function using the training and validation dataset. We will also plot the loss and accuracy values that were obtained while training the model.
Compiling and fitting the model
Compiling the model
For compiling the model, we will use the following code:
# Compile model
model %>% compile(optimizer = "adam",
loss = "categorical_crossentropy",
metrics = c("acc"))
Here, we've specified the adam optimizer. We're using categorical_crossentropy as the loss function since the labels are based on 50 authors. For the metrics, we've specified the accuracy of the author's classification...