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 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 YZLITE repo used to compile the wrapper library
The name of the accelerator
Return if this accelerator supports model compilation
Methods
Compile the given .tflite model and return a new TfliteModel instance with the compiled data
Enable the accelerator data recorder
Enable the accelerator instruction recorder
Update the given ProfilingModelResults with estimated model metrics
- property name: str¶
The name of the 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: int¶
Return the GIT hash of the YZLITE repo used to compile the wrapper library
- Return type:
int
- property accelerator_wrapper¶
Return the TfliteMicroAcceleratorWrapper instance
- 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
- Parameters:
results (ProfilingModelResults) –
- 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 (Optional[Logger]) –
report_path (Optional[str]) –