Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
X2Paddle
提交
46bbbd66
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看板
未验证
提交
46bbbd66
编写于
8月 02, 2019
作者:
J
Jason
提交者:
GitHub
8月 02, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #63 from jiangjiajun/develop
fix import bug
上级
03b3cf76
8c4a8edb
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
4 addition
and
14 deletion
+4
-14
x2paddle/core/util.py
x2paddle/core/util.py
+0
-9
x2paddle/decoder/tf_decoder.py
x2paddle/decoder/tf_decoder.py
+4
-5
未找到文件。
x2paddle/core/util.py
浏览文件 @
46bbbd66
...
@@ -23,15 +23,6 @@ def string(param):
...
@@ -23,15 +23,6 @@ def string(param):
return
"
\'
{}
\'
"
.
format
(
param
)
return
"
\'
{}
\'
"
.
format
(
param
)
def
color_log
(
log_str
):
try
:
from
colorama
import
init
,
Fore
init
(
autoreset
=
True
)
print
(
Fore
.
RED
+
log_str
)
except
:
print
(
log_str
)
# This func will copy to generate code file
# This func will copy to generate code file
def
run_net
(
param_dir
=
"./"
):
def
run_net
(
param_dir
=
"./"
):
import
os
import
os
...
...
x2paddle/decoder/tf_decoder.py
浏览文件 @
46bbbd66
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
from
x2paddle.core.graph
import
GraphNode
,
Graph
from
x2paddle.core.graph
import
GraphNode
,
Graph
from
x2paddle.core.fluid_code
import
FluidCode
from
x2paddle.core.fluid_code
import
FluidCode
from
x2paddle.core.util
import
*
from
tensorflow.python.framework
import
tensor_util
from
tensorflow.python.framework
import
tensor_util
from
tensorflow.python.platform
import
gfile
from
tensorflow.python.platform
import
gfile
from
tensorflow.core.framework
import
attr_value_pb2
from
tensorflow.core.framework
import
attr_value_pb2
...
@@ -217,21 +216,21 @@ class TFDecoder(object):
...
@@ -217,21 +216,21 @@ class TFDecoder(object):
if
need_define_shape
>
0
:
if
need_define_shape
>
0
:
if
need_define_shape
==
1
:
if
need_define_shape
==
1
:
color_log
(
print
(
"
\n
Unknown shape for input tensor[tensor name:
\"
{}
\"
]"
.
"
\n
Unknown shape for input tensor[tensor name:
\"
{}
\"
]"
.
format
(
layer
.
name
))
format
(
layer
.
name
))
else
:
else
:
color_log
(
print
(
"
\n
Shape[now is {}] for input tensor[tensor name:
\"
{}
\"
] not support yet"
"
\n
Shape[now is {}] for input tensor[tensor name:
\"
{}
\"
] not support yet"
.
format
(
shape
,
layer
.
name
))
.
format
(
shape
,
layer
.
name
))
color_log
(
print
(
"Use your keyboard type the shape of input tensor below :)"
)
"Use your keyboard type the shape of input tensor below :)"
)
right_shape_been_input
=
False
right_shape_been_input
=
False
while
not
right_shape_been_input
:
while
not
right_shape_been_input
:
shape
=
input
(
"Shape of Input(e.g. None,224,224,3): "
)
shape
=
input
(
"Shape of Input(e.g. None,224,224,3): "
)
if
shape
.
count
(
"None"
)
>
1
:
if
shape
.
count
(
"None"
)
>
1
:
color_log
(
"Only 1 dimension can be None, type again:)"
)
print
(
"Only 1 dimension can be None, type again:)"
)
else
:
else
:
right_shape_been_input
=
True
right_shape_been_input
=
True
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录