|
STM32N6 NPU Deployment — Politecnico di Milano
1.0
Documentation for Neural Network Deployment on STM32N6 NPU - Politecnico di Milano 2024-2025
|
Functions | |
| def | ai_runner_invoke (image_processed, ai_runner_interpreter) |
| def | _get_zoo_model (DictConfig cfg) |
| tuple | load_model_for_training (DictConfig cfg) |
|
private |
Returns a Keras model object based on the specified configuration and parameters.
Args:
cfg (DictConfig): A dictionary containing the configuration for the model.
num_classes (int): The number of classes for the model.
dropout (float): The dropout rate for the model.
section (str): The section of the model to be used.
Returns:
tf.keras.Model: A Keras model object based on the specified configuration and parameters.
Definition at line 53 of file models_mgt.py.
Referenced by load_model_for_training().
| def models_mgt.ai_runner_invoke | ( | image_processed, | |
| ai_runner_interpreter | |||
| ) |
Definition at line 36 of file models_mgt.py.
Referenced by evaluate.evaluate().
| tuple models_mgt.load_model_for_training | ( | DictConfig | cfg | ) |
"
Loads a model for training.
The model to train can be:
- a model from the Model Zoo
- a user model (BYOM)
- a model previously trained during a training that was interrupted.
When a training is run, the following files are saved in the saved_models
directory:
base_model.h5:
Model saved before the training started. Weights are random.
best_weights.h5:
Best weights obtained since the beginning of the training.
last_weights.h5:
Weights saved at the end of the last epoch.
To resume a training, the last weights are loaded into the base model.
Definition at line 97 of file models_mgt.py.
References _get_zoo_model().