Compiling the model

Next, we compile the model using the following code:

# Compile model
model %>% compile(loss = 'categorical_crossentropy',
optimizer = optimizer_adadelta(),
metrics = 'accuracy')

In the preceding code, loss is specified as categorical_crossentropy as there are 10 categories of fashion items. For the optimizer, we make use of optimizer_adadelta with its recommended default settings. Adadelta is an adaptive learning rate method for gradient descent. As the name suggests, it dynamically adapts over time and doesn't require manual tuning of the learning rate. We have also specified accuracy for the metrics.

In the next section, we will fit the model for image recognition and classification.

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

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