Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
X2Paddle
提交
065797b0
X
X2Paddle
项目概览
PaddlePaddle
/
X2Paddle
大约 1 年 前同步成功
通知
328
Star
698
Fork
167
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
26
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
X2Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
26
Issue
26
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
065797b0
编写于
9月 17, 2019
作者:
C
channings
提交者:
GitHub
9月 17, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4 from PaddlePaddle/develop
pull from PaddlePaddle/develop
上级
41a6297d
461f4cb4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
3 addition
and
3 deletion
+3
-3
x2paddle/op_mapper/tf_op_mapper.py
x2paddle/op_mapper/tf_op_mapper.py
+1
-1
x2paddle/op_mapper/tf_op_mapper_nhwc.py
x2paddle/op_mapper/tf_op_mapper_nhwc.py
+2
-2
未找到文件。
x2paddle/op_mapper/tf_op_mapper.py
浏览文件 @
065797b0
...
@@ -591,7 +591,7 @@ class TFOpMapper(OpMapper):
...
@@ -591,7 +591,7 @@ class TFOpMapper(OpMapper):
# to change [192, -1]->[-1, 192], allways put -1 in the first dimension
# to change [192, -1]->[-1, 192], allways put -1 in the first dimension
# optimization for Paddle-Lite
# optimization for Paddle-Lite
in_shape
=
input
.
out_shapes
[
0
]
in_shape
=
input
.
out_shapes
[
0
]
if
is_variable
and
in_shape
.
count
(
-
1
)
<
1
:
if
not
is_variable
and
in_shape
.
count
(
-
1
)
<
1
:
total_size
=
1
total_size
=
1
for
i
in
range
(
len
(
in_shape
)):
for
i
in
range
(
len
(
in_shape
)):
total_size
*=
in_shape
[
i
]
total_size
*=
in_shape
[
i
]
...
...
x2paddle/op_mapper/tf_op_mapper_nhwc.py
浏览文件 @
065797b0
...
@@ -74,7 +74,7 @@ class TFOpMapperNHWC(OpMapper):
...
@@ -74,7 +74,7 @@ class TFOpMapperNHWC(OpMapper):
unsupported_ops
=
set
()
unsupported_ops
=
set
()
sys
.
stderr
.
write
(
"Total nodes: {}
\n
"
.
format
(
len
(
self
.
graph
.
topo_sort
)))
sys
.
stderr
.
write
(
"Total nodes: {}
\n
"
.
format
(
len
(
self
.
graph
.
topo_sort
)))
for
i
,
node_name
in
enumerate
(
self
.
graph
.
topo_sort
):
for
i
,
node_name
in
enumerate
(
self
.
graph
.
topo_sort
):
sys
.
stderr
.
write
(
"
\r
Converting node {} ... "
.
format
(
i
))
sys
.
stderr
.
write
(
"
\r
Converting node {} ... "
.
format
(
i
+
1
))
node
=
self
.
graph
.
get_node
(
node_name
)
node
=
self
.
graph
.
get_node
(
node_name
)
op
=
node
.
layer_type
op
=
node
.
layer_type
if
op
in
self
.
directly_map_ops
:
if
op
in
self
.
directly_map_ops
:
...
@@ -99,7 +99,7 @@ class TFOpMapperNHWC(OpMapper):
...
@@ -99,7 +99,7 @@ class TFOpMapperNHWC(OpMapper):
for
op
in
unsupported_ops
:
for
op
in
unsupported_ops
:
print
(
"========== {} ============"
.
format
(
op
))
print
(
"========== {} ============"
.
format
(
op
))
sys
.
exit
(
-
1
)
sys
.
exit
(
-
1
)
sys
.
stderr
.
write
(
"
\n
Done
\n
"
)
sys
.
stderr
.
write
(
"
\n
Done
!
\n
"
)
def
add_omit_nodes
(
self
,
in_node_name
,
out_node_name
):
def
add_omit_nodes
(
self
,
in_node_name
,
out_node_name
):
in_node
=
self
.
graph
.
get_node
(
in_node_name
)
in_node
=
self
.
graph
.
get_node
(
in_node_name
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录