mltk.core.tflite_micro.tflite_micro_accelerator.TfliteMicroAccelerator¶
- class TfliteMicroAccelerator[source]¶
TF-Lite Micro Accelerator
This class allows for providing hardware-accelerated kernels to the TFLM interpreter.
Properties
Return the TfliteMicroAcceleratorWrapper instance
The name of the variant actively being used by this accelerator
The API version number this wrapper was built with This number must match the tflite_micro_wrapper's API version
Return the GIT hash of the MLTK repo used to compile the wrapper library
The name of the accelerator
Return if this accelerator supports model compilation
List of variants supported by this accelerator
Methods
Compile the given .tflite model and return a new TfliteModel instance with the compiled data
Enable the accelerator data recorder
Update the given ProfilingModelResults with estimated model metrics
Enable the accelerator instruction recorder
- property name: str¶
The name of the accelerator
- Return type:
str
- property variants: List[str]¶
List of variants supported by this accelerator
- Return type:
List
[str
]
- property active_variant: str¶
The name of the variant actively being used by this accelerator
- Return type:
str
- property api_version: int¶
The API version number this wrapper was built with This number must match the tflite_micro_wrapper’s API version
- Return type:
int
- property git_hash: str¶
Return the GIT hash of the MLTK repo used to compile the wrapper library
- Return type:
str
- property accelerator_wrapper: object¶
Return the TfliteMicroAcceleratorWrapper instance
- Return type:
object
- property supports_model_compilation: bool¶
Return if this accelerator supports model compilation
- Return type:
bool
- estimate_profiling_results(results, **kwargs)[source]¶
Update the given ProfilingModelResults with estimated model metrics
- set_program_recorder_enabled(enabled)[source]¶
Enable the accelerator instruction recorder
- Parameters:
enabled (bool) –
- compile_model(model, logger=None, report_path=None, **kwargs)[source]¶
Compile the given .tflite model and return a new TfliteModel instance with the compiled data
NOTE: The accelerator must support model compilation to use this API
- Return type:
- Parameters:
model (TfliteModel) –
logger (Logger) –
report_path (str) –