Model Fitting
Once a model has been initialized and layers have been added to the ANN, the model must be configured with an optimizer, losses, and any evaluation metrics through the compilation process. A model can be compiled using the model's compile
method, as follows:
model.compile(optimizer='adam', loss='binary_crossentropy', \ metrics=['accuracy'])
Optimizers can be chosen by simply naming the optimizer as the argument. The following optimizers are available as default for Keras models:
- Stochastic gradient descent (SGD): This updates the weights for each example in the dataset. You can find more information about SGD here: https://keras.io/api/optimizers/sgd/.
- RMSprop: This is an adaptive optimizer that varies the weights during training by using a decaying average of the gradients at each update. You can find more information about RMSprop...