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.

Now that the model has been compiled, it's ready for training.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset