Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
libtf: Add operators size to params.
Browse files Browse the repository at this point in the history
Signed-off-by: iabdalkader <[email protected]>
  • Loading branch information
iabdalkader committed Feb 25, 2024
1 parent b14944d commit 624fa03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libtf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ extern "C" {
libtf_resolver_init(resolver);

tflite::MicroInterpreter interpreter(model, resolver, tensor_arena, tensor_arena_size, error_reporter);
params->operators_size = interpreter.operators_size();

if (interpreter.AllocateTensors() != kTfLiteOk) {
error_reporter->Report("AllocateTensors() failed!");
Expand Down
1 change: 1 addition & 0 deletions libtf.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ typedef struct libtf_parameters {
libtf_datatype_t output_datatype;
float output_scale;
int output_zero_point;
size_t operators_size;
} libtf_parameters_t;

// Call this first to get the model parameters.
Expand Down

0 comments on commit 624fa03

Please sign in to comment.