YZLiteModelEvent¶
- class YZLiteModelEvent[source]¶
Events that are triggered at various stages of
YZLiteModelexecution.See
add_event_handlerfor more details.Properties
Invoked before the
YZLiteModelis fully loaded.Invoked after the
YZLiteModelis fully loaded.Invoked at the beginning of
load_datasetInvoked at the end of
load_datasetInvoked at the beginning of
unload_datasetInvoked at the end of
unload_datasetInvoked at the end of
summarize_datasetInvoked at the end of
summarize_modelInvoked at the beginning of
train_modelInvoked before
build_model_functionis calledInvoked after
build_model_functionis calledInvoked during
train_modelbefore Keras training starts.Invoked during
train_modelbefore Keras trainingInvoked during
train_modelafter Keras trainingInvoked during
train_modelbefore the trained model is savedInvoked during
train_modelafter the trained model is savedInvoked during
train_modelbefore the training results are savedInvoked during
train_modelafter the training results are savedInvoked during
train_modelbefore the model archive is savedInvoked during
train_modelafter the model archive is savedInvoked at the end of
train_modelInvoked at the beginning of
quantize_model//www.tensorflow.org/lite/convert>`_ is invoked
Invoked during
quantize_modelafter the TfliteConverter is invokedInvoked at the end of
quantize_modelInvoked at the beginning of
evaluate_modelInvoked at the end of
evaluate_modelInvoked when generating a plot during
evaluate_modelInvoked at the end of
profile_model- BEFORE_MODEL_LOAD = 'BEFORE_MODEL_LOAD'¶
Invoked before the
YZLiteModelis fully loaded.This event does not have any additional keyword arguments.
- AFTER_MODEL_LOAD = 'AFTER_MODEL_LOAD'¶
Invoked after the
YZLiteModelis fully loaded.This event does not have any additional keyword arguments.
- BEFORE_LOAD_DATASET = 'BEFORE_LOAD_DATASET'¶
Invoked at the beginning of
load_datasetThis has the additional keyword arguments:
subset - One of training, validation or evaluation
test - True if the data is being loaded for testing
- AFTER_LOAD_DATASET = 'AFTER_LOAD_DATASET'¶
Invoked at the end of
load_datasetThis has the additional keyword arguments:
subset - One of training, validation or evaluation
test - True if the data is being loaded for testing
- BEFORE_UNLOAD_DATASET = 'BEFORE_UNLOAD_DATASET'¶
Invoked at the beginning of
unload_datasetThis event does not have any additional keyword arguments.
- AFTER_UNLOAD_DATASET = 'AFTER_UNLOAD_DATASET'¶
Invoked at the end of
unload_datasetThis event does not have any additional keyword arguments.
- SUMMARIZE_DATASET = 'SUMMARIZE_DATASET'¶
Invoked at the end of
summarize_datasetThis has the additional keyword arguments:
summary - The generated summary as a string, the summary cannot be modified in the event handler
summary_dict - The generated summary as
summary_dict=dict(value=summary),summary_dict['value']may be modified in the event handler
- SUMMARIZE_MODEL = 'SUMMARIZE_MODEL'¶
Invoked at the end of
summarize_modelThis has the additional keyword arguments:
summary - The generated summary as a string, the summary cannot be modified in the event handler
summary_dict - The generated summary as
summary_dict=dict(value=summary), Updatesummary_dict['value']to return a new summary by the event handler
- TRAIN_STARTUP = 'TRAIN_STARTUP'¶
Invoked at the beginning of
train_modelThis has the additional keyword arguments:
post_process - True if post-processing is enabled
- BEFORE_BUILD_TRAIN_MODEL = 'BEFORE_BUILD_TRAIN_MODEL'¶
Invoked before
build_model_functionis calledThis event does not have any additional keyword arguments.
- AFTER_BUILD_TRAIN_MODEL = 'AFTER_BUILD_TRAIN_MODEL'¶
Invoked after
build_model_functionis calledThis has the additional keyword arguments:
keras_model - The built Keras model
- POPULATE_TRAIN_CALLBACKS = 'POPULATE_TRAIN_CALLBACKS'¶
Invoked during
train_modelbefore Keras training starts.This has the additional keyword arguments:
keras_callbacks - A list of Keras Callbacks that will be passed to KerasModel.fit()
- BEFORE_TRAIN = 'BEFORE_TRAIN'¶
Invoked during
train_modelbefore Keras trainingThis has the additional keyword arguments:
fit_kwargs - Keyword args passed to KerasModel.fit()
- AFTER_TRAIN = 'AFTER_TRAIN'¶
Invoked during
train_modelafter Keras trainingThis has the additional keyword arguments:
training_history - The value returned by KerasModel.fit()
- BEFORE_SAVE_TRAIN_MODEL = 'BEFORE_SAVE_TRAIN_MODEL'¶
Invoked during
train_modelbefore the trained model is savedThis has the additional keyword arguments:
keras_model - The trained Keras model, this cannot be modified by the event handler
keras_model_dict - The trained Keras model as
keras_model_dict=dict(value=keas_model), updatekeras_model_dict['value']to return a new model by the event handler
- AFTER_SAVE_TRAIN_MODEL = 'AFTER_SAVE_TRAIN_MODEL'¶
Invoked during
train_modelafter the trained model is savedThis has the additional keyword arguments:
keras_model - The trained Keras model, this cannot be modified by the event handler
keras_model_dict - The trained Keras model as
keras_model_dict=dict(value=keas_model), updatekeras_model_dict['value']to return a new model by the event handler
- BEFORE_SAVE_TRAIN_RESULTS = 'BEFORE_SAVE_TRAIN_RESULTS'¶
Invoked during
train_modelbefore the training results are savedThis has the additional keyword arguments:
keras_model - The trained Keras model, this cannot be modified by the event handler
results - The model
TrainingResultsoutput_dir - Directory path where the results are saved
- AFTER_SAVE_TRAIN_RESULTS = 'AFTER_SAVE_TRAIN_RESULTS'¶
Invoked during
train_modelafter the training results are savedThis has the additional keyword arguments:
keras_model - The trained Keras model, this cannot be modified by the event handler
results - The model
TrainingResultsoutput_dir - Directory path where the results are saved
- BEFORE_SAVE_TRAIN_ARCHIVE = 'BEFORE_SAVE_TRAIN_ARCHIVE'¶
Invoked during
train_modelbefore the model archive is savedThis has the additional keyword arguments:
archive_path - Path where archive will be saved
- AFTER_SAVE_TRAIN_ARCHIVE = 'AFTER_SAVE_TRAIN_ARCHIVE'¶
Invoked during
train_modelafter the model archive is savedThis has the additional keyword arguments:
archive_path - Path where archive was saved
- TRAIN_SHUTDOWN = 'TRAIN_SHUTDOWN'¶
Invoked at the end of
train_modelThis has the additional keyword arguments:
results - The model
TrainingResults
- QUANTIZE_STARTUP = 'QUANTIZE_STARTUP'¶
Invoked at the beginning of
quantize_modelThis has the additional keyword arguments:
build - True if the model is being built for profiling
keras_model - The provided Keras model, if one was given
tflite_converter_settings - Dictionary of settings that will be given to TfliteConverter
post_process - True if post-processing is enabled
- BEFORE_QUANTIZE = 'BEFORE_QUANTIZE'¶
//www.tensorflow.org/lite/convert>`_ is invoked
This has the additional keyword arguments:
archive_path - Path where archive was saved
converter - The TfliteConverter used to quantize the model
- Type:
Invoked during
quantize_modelbefore the ` <https
- AFTER_QUANTIZE = 'AFTER_QUANTIZE'¶
Invoked during
quantize_modelafter the TfliteConverter is invokedThis has the additional keyword arguments:
tflite_flatbuffer - The tflite flatbuffer binary array
- QUANTIZE_SHUTDOWN = 'QUANTIZE_SHUTDOWN'¶
Invoked at the end of
quantize_modelThis has the additional keyword arguments:
tflite_model - The quantized
TfliteModelinstance
- EVALUATE_STARTUP = 'EVALUATE_STARTUP'¶
Invoked at the beginning of
evaluate_modelThis has the additional keyword arguments:
tflite - True if should evaluate .tflite model, else evaluating Keras model
max_samples_per_class - This option places an upper limit on the number of samples per class that are used for evaluation
post_process - True if post-processing is enabled
- EVALUATE_SHUTDOWN = 'EVALUATE_SHUTDOWN'¶
Invoked at the end of
evaluate_modelThis has the additional keyword arguments:
results - The generated
EvaluationResults
- GENERATE_EVALUATE_PLOT = 'GENERATE_EVALUATE_PLOT'¶
Invoked when generating a plot during
evaluate_modelThis has the additional keyword arguments:
tflite - True if evaluating .tflite model, else evaluating Keras model
name - The name of the plot
fig - The matlibplot figure
- AFTER_PROFILE = 'AFTER_PROFILE'¶
Invoked at the end of
profile_modelThis has the additional keyword arguments:
results - The generated
ProfilingModelResults