The most flexible way to make use of the Keras API is to subclass the [keras.Model](/api/models/model#model-class) class. Subclassing the Model class gives you the ability to fully customize what occurs in the training loop. This makes subclassing Model a popular option for researchers.