summarize_model¶
- summarize_model(model, tflite=False, build=False, test=False, built_model=None)[source]¶
Generate a summary of the given model and return the summary as a string
- Parameters:
model (
Union[str,MltkModel,Model,TfliteModel]) –Either
a path to a .tflite, .h5, .mltk.zip, .py file,
or
mltk.core.TfliteModelinstance
tflite (
bool) – If true, the return the summary of the corresponding .tflite model. If true and model=mltk.core.KerasModel, this will quantize it into a .tflite modelbuild (
bool) – If true, then generate a .h5 or .tflite by training the givenmltk.core.MltkModelmodel for 1 epoch. This is useful for summarizing themltk.core.MltkModelwithout fully training the model firsttest (
bool) – If true and the model is the name of a MltkModel, then load the MltkModel in testing modebuilt_model (
Union[Model,TfliteModel]) – Optional, previously builtmltk.core.KerasModelormltk.core.TfliteModelassociated with givenmltk.core.MltkModel
- Return type:
str- Returns:
A summary of the given model as a string