Skip to content

Commit

Permalink
introduce new feature: GenRefLabels 3
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed May 27, 2024
1 parent 86d7aa9 commit 7b435d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mlonmcu/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ class Model(Workload):
"support_path": None,
"inputs_path": None,
"outputs_path": None,
"output_labels_path": None,
}

def __init__(self, name, paths, config=None, alt=None, formats=ModelFormats.TFLITE):
Expand Down Expand Up @@ -248,6 +249,16 @@ def outputs_path(self):
value = Path(value)
return value

@property
def output_labels_path(self):
# TODO: fall back to metadata
value = self.config["output_labels_path"]
if value is not None:
if not isinstance(value, Path):
assert isinstance(value, str)
value = Path(value)
return value

@property
def skip_check(self):
if len(self.formats) == 0:
Expand Down

0 comments on commit 7b435d9

Please sign in to comment.