Results

To further explore any changes in the image-classification performance of the model that may not be obvious from a graphical summary, let's look at some numerical summaries:

  1. We will look at the results based on the training data first, and will make use of the following code:
# Loos and accuracymodel %>% evaluate(trainx, trainLabels)OUTPUT12/12 [==============================] - 0s 198us/step$loss[1] 0.03438224643$acc[1] 1# Confusion matrixpred <- model %>%   predict_classes(trainx)table(Predicted=pred, Actual=trainy)OUTPUT         ActualPredicted 0 1 2        0 3 0 0        1 0 3 0        2 0 0 3

From the preceding output, we can see that the loss value has now reduced to 0.034 and the accuracy is maintained at 1.0. We obtain the same confusion matrix results  ...

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.