ONE - On-device Neural Engine
Loading...
Searching...
No Matches
minimal Namespace Reference

Functions

 main (nnpackage_path, backends="cpu")
 

Variables

 argv = sys.argv[1:]
 

Function Documentation

◆ main()

minimal.main (   nnpackage_path,
  backends = "cpu" 
)

Definition at line 5 of file minimal.py.

5def main(nnpackage_path, backends="cpu"):
6 # Create session and load nnpackage
7 # The default value of backends is "cpu".
8 session = infer.session(nnpackage_path, backends)
9
10 # Prepare input. Here we just allocate dummy input arrays.
11 input_size = session.input_size()
12 session.set_inputs(input_size)
13
14 outputs = session.inference()
15
16 print(f"nnpackage {nnpackage_path.split('/')[-1]} runs successfully.")
17 return
18
19
int main(void)

Variable Documentation

◆ argv

minimal.argv = sys.argv[1:]

Definition at line 21 of file minimal.py.