Fitting the model

For fit the model, we will continue with the format that we have been using in the earlier chapters. The following code is used to fit the model:

# Fit model
model_one <- model %>% fit(trainx,
trainy,
epochs = 15,
batch_size = 128,
validation_split = 0.2)
plot(model_one)

Here, we are using 20 epochs, a batch size of 128, and 20% of the training data is reserved for validation. Since the neural network used here is more complex than the previous chapters, each run is likely to take relatively more time.

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

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