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

Functions

 run_caffe2 (init_net, predict_net, input_path, output_path='')
 

Variables

 args = regular_step()
 

Function Documentation

◆ run_caffe2()

model_runner_caffe2.run_caffe2 (   init_net,
  predict_net,
  input_path,
  output_path = '' 
)

Definition at line 6 of file model_runner_caffe2.py.

6def run_caffe2(init_net, predict_net, input_path, output_path=''):
7 x = read_input(input_path)
8 with open(init_net, 'rb') as f:
9 init_net = f.read()
10
11 with open(predict_net, 'rb') as f:
12 predict_net = f.read()
13 p = workspace.Predictor(init_net, predict_net)
14 # TODO get 'data' parameter more universal, blobs contain other names
15 results = p.run({'data': x})
16 print(results)
17 save_result(output_path, results)
18
19

References common_place.read_input(), and common_place.save_result().

Variable Documentation

◆ args

model_runner_caffe2.args = regular_step()

Definition at line 21 of file model_runner_caffe2.py.