-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
067e814
commit 47f2802
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
# XMOS AI Tools | ||
|
||
## Usage | ||
|
||
### Using xformer | ||
``` | ||
from xmos_ai_tools import xformer as xf | ||
xf.convert("source model path", "converted model path", params=None) | ||
``` | ||
|
||
### Using the xcore tflm host interpreter | ||
``` | ||
from xmos_ai_tools import xcore_tflm_host_interpreter as xtflm | ||
ie = xtflm.XTFLMInterpreter(model_content=xformed_model) | ||
ie.set_input_tensor(0, input_tensor) | ||
ie.invoke() | ||
xformer_outputs = [] | ||
for i in range(num_of_outputs): | ||
xformer_outputs.append(ie.get_output_tensor(i)) | ||
``` |