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

Functions

 run_caffe (model_topology, model_weight, input_path, output_path='')
 

Variables

 args = regular_step()
 

Function Documentation

◆ run_caffe()

model_runner_caffe.run_caffe (   model_topology,
  model_weight,
  input_path,
  output_path = '' 
)

Definition at line 5 of file model_runner_caffe.py.

5def run_caffe(model_topology, model_weight, input_path, output_path=''):
6 path = model_topology
7 path_w = model_weight
8
9 net = caffe.Net(path_w, path, caffe.TEST)
10 # TODO get 'data' parameter more universal, blobs contain other names
11 net.blobs['data'].data[...] = read_input(input_path)
12 out = net.forward()
13 all_names = [n for n in net._layer_names]
14 out = out[all_names[-1]]
15 save_result(output_path, out)
16 print(out)
17
18

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

Variable Documentation

◆ args

model_runner_caffe.args = regular_step()

Definition at line 20 of file model_runner_caffe.py.