Skip to content

Commit

Permalink
Merge pull request #799 from Allan-xmos/feature/host_interpreter_tweaks
Browse files Browse the repository at this point in the history
Feature/host interpreter tweaks
  • Loading branch information
panickal-xmos authored Aug 18, 2023
2 parents f32acdb + ca5948a commit 11823de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/xmos_ai_tools/xinterpreters/base/base_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def print_memory_plan(self) -> None:
"""! Abstract method to print a plan of memory allocation"""
raise NotImplementedError

def allocate_tensors(self):
"""! Dummy function to match tf.lite.Interpreter() API"""
return

def get_input_tensor_size(self, input_index: int = 0, model_index: int = 0) -> int:
"""! Read the size of the input tensor from the model.
@param input_index The index of input tensor to target.
Expand Down Expand Up @@ -398,6 +402,8 @@ def set_model(
)
)
self.initialise_interpreter(model_index)
else:
raise ValueError("model_path must be str")

def get_model(self, model_index: int = 0):
for model in self.models:
Expand Down

0 comments on commit 11823de

Please sign in to comment.