Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
71267a90
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
332
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
71267a90
编写于
11月 25, 2019
作者:
Z
zhupengyang
提交者:
GitHub
11月 25, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[NPU] add check for reshape when "Shape" from Tensors (#2483)
fix errors for conv and conv_transpose test=develop
上级
c15e5e05
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
6 deletion
+8
-6
lite/kernels/npu/bridges/conv_op.cc
lite/kernels/npu/bridges/conv_op.cc
+2
-2
lite/kernels/npu/bridges/conv_transpose_op.cc
lite/kernels/npu/bridges/conv_transpose_op.cc
+2
-2
lite/kernels/npu/bridges/reshape_op.cc
lite/kernels/npu/bridges/reshape_op.cc
+4
-2
未找到文件。
lite/kernels/npu/bridges/conv_op.cc
浏览文件 @
71267a90
...
...
@@ -59,8 +59,8 @@ node_map_type ConvConverter(const std::shared_ptr<lite::OpLite> conv_op,
bool
pad_equal
=
((
paddings
[
0
]
==
paddings
[
1
])
&&
(
paddings
[
2
]
==
paddings
[
3
]));
if
(
!
pad_equal
)
{
LOG
(
FATA
)
<<
"This pad not support ! "
<<
paddings
[
0
]
<<
", "
<<
paddings
[
1
]
<<
", "
<<
paddings
[
2
]
<<
", "
<<
paddings
[
3
];
LOG
(
FATA
L
)
<<
"This pad not support ! "
<<
paddings
[
0
]
<<
", "
<<
paddings
[
1
]
<<
", "
<<
paddings
[
2
]
<<
", "
<<
paddings
[
3
];
}
// check depthwise mode, and decide whether use ConvolutionDepthwise Op
...
...
lite/kernels/npu/bridges/conv_transpose_op.cc
浏览文件 @
71267a90
...
...
@@ -54,8 +54,8 @@ node_map_type ConvTransposeConverter(
bool
pad_equal
=
((
paddings
[
0
]
==
paddings
[
1
])
&&
(
paddings
[
2
]
==
paddings
[
3
]));
if
(
!
pad_equal
)
{
LOG
(
FATA
)
<<
"This pad not support ! "
<<
paddings
[
0
]
<<
", "
<<
paddings
[
1
]
<<
", "
<<
paddings
[
2
]
<<
", "
<<
paddings
[
3
];
LOG
(
FATA
L
)
<<
"This pad not support ! "
<<
paddings
[
0
]
<<
", "
<<
paddings
[
1
]
<<
", "
<<
paddings
[
2
]
<<
", "
<<
paddings
[
3
];
}
// create input sizes node to describe the dimensions of input tensor
std
::
vector
<
int32_t
>
output_shape
;
...
...
lite/kernels/npu/bridges/reshape_op.cc
浏览文件 @
71267a90
...
...
@@ -41,8 +41,10 @@ node_map_type ReshapeConverter(const std::shared_ptr<lite::OpLite> reshape_op,
reshape_node
->
set_input_tensor
(
*
inputs_map
.
at
(
x_var_name
));
lite
::
npu
::
OpList
::
Global
().
add
(
inputs_map
.
at
(
x_var_name
));
// read shape from actual shape tensor as input "w" if 'Shape' is found
if
(
lite
::
npu
::
HasInputArg
(
op_info
,
scope
,
"Shape"
))
{
// read shape from "ShapeTensor"(input), or "Shape"(input), or "shape"(attr)
if
(
lite
::
npu
::
HasInputArg
(
op_info
,
scope
,
"ShapeTensor"
))
{
LOG
(
FATAL
)
<<
"[NPU] not support
\"
Shape
\"
from more than one Tensor."
;
}
else
if
(
lite
::
npu
::
HasInputArg
(
op_info
,
scope
,
"Shape"
))
{
auto
actual_shape_var_name
=
op_info
->
Input
(
"Shape"
).
front
();
if
(
!
inputs_map
.
count
(
actual_shape_var_name
))
{
auto
actual_shape
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录