ONE - On-device Neural Engine
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
w
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
i
k
l
m
n
o
p
q
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
u
v
w
y
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
a
c
d
e
f
g
i
k
l
m
o
p
r
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Symbols
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Variables
_
b
c
d
f
g
i
k
m
n
o
p
s
t
v
Typedefs
a
d
f
g
i
l
m
n
o
s
t
u
v
Enumerations
f
g
n
o
p
r
Enumerator
a
k
n
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
model_runner_caffe.py
Go to the documentation of this file.
1
from
common_place
import
*
2
import
caffe
3
4
5
def
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
5
def
run_caffe
(model_topology, model_weight, input_path, output_path=''):
…
19
if
__name__ ==
'__main__'
:
20
args =
regular_step
()
21
22
run_caffe
(args.model[0], args.model[1], args.input, args.output_path)
common_place.regular_step
regular_step()
Definition
common_place.py:6
common_place.read_input
read_input(input_path)
Definition
common_place.py:64
common_place.save_result
save_result(output_path, output_data)
Definition
common_place.py:50
model_runner_caffe.run_caffe
run_caffe(model_topology, model_weight, input_path, output_path='')
Definition
model_runner_caffe.py:5
compiler
nnc
utils
model_runner
model_runner_caffe.py
Generated by
1.9.8