Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
d95b5cd5
Mace
项目概览
Xiaomi
/
Mace
通知
107
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d95b5cd5
编写于
3月 16, 2018
作者:
L
liuqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code.
上级
0c3967d6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
12 deletion
+3
-12
mace/ops/fully_connected_benchmark.cc
mace/ops/fully_connected_benchmark.cc
+3
-9
mace/python/tools/caffe_converter_lib.py
mace/python/tools/caffe_converter_lib.py
+0
-1
tools/validate.py
tools/validate.py
+0
-2
未找到文件。
mace/ops/fully_connected_benchmark.cc
浏览文件 @
d95b5cd5
...
@@ -23,15 +23,9 @@ static void FCBenchmark(
...
@@ -23,15 +23,9 @@ static void FCBenchmark(
if
(
D
==
DeviceType
::
OPENCL
)
{
if
(
D
==
DeviceType
::
OPENCL
)
{
const
int
width_size
=
height
*
width
*
channel
;
const
int
width_size
=
height
*
width
*
channel
;
kernels
::
BufferType
weight_type
=
kernels
::
BufferType
::
WEIGHT_HEIGHT
;
kernels
::
BufferType
weight_type
=
kernels
::
BufferType
::
WEIGHT_WIDTH
;
// if (width_size > 16384) {
BufferToImage
<
D
,
T
>
(
net
,
"Weight"
,
"WeightImage"
,
BufferToImage
<
D
,
T
>
(
net
,
"Weight"
,
"WeightImage"
,
weight_type
);
kernels
::
BufferType
::
WEIGHT_WIDTH
);
weight_type
=
kernels
::
BufferType
::
WEIGHT_WIDTH
;
// } else {
// BufferToImage<D, T>(net, "Weight", "WeightImage",
// kernels::BufferType::WEIGHT_HEIGHT);
// }
BufferToImage
<
D
,
T
>
(
net
,
"Input"
,
"InputImage"
,
BufferToImage
<
D
,
T
>
(
net
,
"Input"
,
"InputImage"
,
kernels
::
BufferType
::
IN_OUT_CHANNEL
);
kernels
::
BufferType
::
IN_OUT_CHANNEL
);
BufferToImage
<
D
,
T
>
(
net
,
"Bias"
,
"BiasImage"
,
BufferToImage
<
D
,
T
>
(
net
,
"Bias"
,
"BiasImage"
,
...
...
mace/python/tools/caffe_converter_lib.py
浏览文件 @
d95b5cd5
...
@@ -422,7 +422,6 @@ class CaffeConverter(object):
...
@@ -422,7 +422,6 @@ class CaffeConverter(object):
# Add filter
# Add filter
weight_tensor_name
=
op
.
name
+
'_weight:0'
weight_tensor_name
=
op
.
name
+
'_weight:0'
self
.
add_tensor
(
weight_tensor_name
,
op
.
data
[
0
])
self
.
add_tensor
(
weight_tensor_name
,
op
.
data
[
0
])
print
'Winograd filter shape:'
,
op
.
data
[
0
].
shape
buffer_type
=
"WINOGRAD_FILTER"
buffer_type
=
"WINOGRAD_FILTER"
filter_name
=
self
.
add_buffer_to_image
(
weight_tensor_name
,
buffer_type
)
filter_name
=
self
.
add_buffer_to_image
(
weight_tensor_name
,
buffer_type
)
...
...
tools/validate.py
浏览文件 @
d95b5cd5
...
@@ -105,12 +105,10 @@ def validate_caffe_model(input_names, input_shapes, output_names, output_shapes)
...
@@ -105,12 +105,10 @@ def validate_caffe_model(input_names, input_shapes, output_names, output_shapes)
for
i
in
range
(
len
(
output_names
)):
for
i
in
range
(
len
(
output_names
)):
value
=
net
.
blobs
[
net
.
top_names
[
output_names
[
i
]][
0
]].
data
[
0
]
value
=
net
.
blobs
[
net
.
top_names
[
output_names
[
i
]][
0
]].
data
[
0
]
print
net
.
top_names
[
output_names
[
i
]][
0
]
out_shape
=
output_shapes
[
i
]
out_shape
=
output_shapes
[
i
]
out_shape
[
1
],
out_shape
[
2
],
out_shape
[
3
]
=
out_shape
[
3
],
out_shape
[
1
],
out_shape
[
2
]
out_shape
[
1
],
out_shape
[
2
],
out_shape
[
3
]
=
out_shape
[
3
],
out_shape
[
1
],
out_shape
[
2
]
value
=
value
.
reshape
(
out_shape
).
transpose
((
0
,
2
,
3
,
1
))
value
=
value
.
reshape
(
out_shape
).
transpose
((
0
,
2
,
3
,
1
))
output_file_name
=
FLAGS
.
mace_out_file
+
"_"
+
format_output_name
(
output_names
[
i
])
output_file_name
=
FLAGS
.
mace_out_file
+
"_"
+
format_output_name
(
output_names
[
i
])
print
'output file name:'
,
output_file_name
mace_out_value
=
load_data
(
output_file_name
)
mace_out_value
=
load_data
(
output_file_name
)
compare_output
(
output_names
[
i
],
mace_out_value
,
value
)
compare_output
(
output_names
[
i
],
mace_out_value
,
value
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录