There are multiple issues that can be solved by rewriting model_classes to build models using the Sequential API. Currently models are constructed using the functional API. The functional API allows for customization outside the scope of ANNSA (models that share layers, multiple network inputs, acyclic network graphs). The Sequential API also allows for built models to be easily passed to sklearn for hyperparameter tuning (keras.wrappers.scikitlearn.KerasClassifier).
Training with the Sequential API would fix:
Issues 63 and 71 because the .fit() method returns all training losses and metrics in a dictionary (Keras History object). This can be easily saved and loaded into analysis notebooks.
Issues 68 because it is related to the training routine in the base_class of model_classes.
Issue 70 would be removed because there would be no base_class in model_classes.
This issue can be closed when each model in model_classes is written using the Sequential API and tests exist to ensure they run as expected.
To ensure backwards compatibility and transparency, the functional API implementation will be kept in the model_classes.py module and the Sequential API method should be added to a new module.
There are multiple issues that can be solved by rewriting model_classes to build models using the Sequential API. Currently models are constructed using the functional API. The functional API allows for customization outside the scope of ANNSA (models that share layers, multiple network inputs, acyclic network graphs). The Sequential API also allows for built models to be easily passed to sklearn for hyperparameter tuning (
keras.wrappers.scikitlearn.KerasClassifier
).Training with the Sequential API would fix:
base_class
ofmodel_classes
.base_class
inmodel_classes
.This issue can be closed when each model in
model_classes
is written using the Sequential API and tests exist to ensure they run as expected.