October 2018
Intermediate to advanced
472 pages
10h 57m
English
With the model compiled, we will now fit the model on the data using the fit method of the model. Here, since we are training on a small set of data, it is important to set the parameter shuffle to True so that the images are shuffled after each epoch:
# fit the modelhistory = model.fit(train_data, train_label, callbacks=callbacks_list, batch_size=batch_size, epochs=nb_epoch, verbose=1, shuffle = True, validation_data = (val_data, val_label))
This should be the output:

The following shows the accuracy and loss plots:
Read now
Unlock full access