Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
X2Paddle
提交
98a150fc
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看板
提交
98a150fc
编写于
8月 06, 2019
作者:
J
jiangjiajun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify setup.py
上级
399b2384
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
4 deletion
+23
-4
README.md
README.md
+1
-1
setup.py
setup.py
+9
-2
x2paddle/__init__.py
x2paddle/__init__.py
+1
-0
x2paddle/convert.py
x2paddle/convert.py
+12
-1
未找到文件。
README.md
浏览文件 @
98a150fc
...
@@ -20,7 +20,7 @@ paddlepaddle >= 1.5.0
...
@@ -20,7 +20,7 @@ paddlepaddle >= 1.5.0
## 安装
## 安装
```
```
pip install
git+https://github.com/PaddlePaddle/X2Paddle.git@develop
pip install
x2paddle --index-url=https://pypi.org/simple/
```
```
## 使用方法
## 使用方法
...
...
setup.py
浏览文件 @
98a150fc
import
setuptools
import
setuptools
import
x2paddle
long_description
=
"X2Paddle is a toolkit for converting trained model to PaddlePaddle from other deep learning frameworks.
\n\n
"
long_description
+=
"Usage: x2paddle --framework tensorflow --model tf_model.pb --save_dir paddle_model
\n
"
long_description
+=
"GitHub: https://github.com/PaddlePaddle/X2Paddle
\n
"
long_description
+=
"Email: dltp-sz@baidu.com"
setuptools
.
setup
(
setuptools
.
setup
(
name
=
"x2paddle"
,
name
=
"x2paddle"
,
version
=
"0.4.0"
,
version
=
x2paddle
.
__version__
,
author
=
"dltp-sz"
,
author
=
"dltp-sz"
,
author_email
=
"dltp-sz@baidu.com"
,
author_email
=
"dltp-sz@baidu.com"
,
description
=
description
=
"a toolkit for converting trained model to PaddlePaddle from other deep learning frameworks."
,
"a toolkit for converting trained model to PaddlePaddle from other deep learning frameworks."
,
long_description_content_type
=
"text/markdown"
,
long_description
=
long_description
,
long_description_content_type
=
"text/plain"
,
url
=
"https://github.com/PaddlePaddle/x2paddle"
,
url
=
"https://github.com/PaddlePaddle/x2paddle"
,
packages
=
setuptools
.
find_packages
(),
packages
=
setuptools
.
find_packages
(),
classifiers
=
[
classifiers
=
[
...
...
x2paddle/__init__.py
浏览文件 @
98a150fc
__version__
=
"0.4.1"
x2paddle/convert.py
浏览文件 @
98a150fc
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
from
six
import
text_type
as
_text_type
from
six
import
text_type
as
_text_type
import
argparse
import
argparse
import
sys
import
sys
import
x2paddle
def
arg_parser
():
def
arg_parser
():
...
@@ -49,6 +50,12 @@ def arg_parser():
...
@@ -49,6 +50,12 @@ def arg_parser():
type
=
_text_type
,
type
=
_text_type
,
default
=
None
,
default
=
None
,
help
=
"caffe proto file of caffe model"
)
help
=
"caffe proto file of caffe model"
)
parser
.
add_argument
(
"--version"
,
"-v"
,
action
=
"store_true"
,
default
=
False
,
help
=
"get version of x2paddle"
)
return
parser
return
parser
...
@@ -112,12 +119,16 @@ def caffe2paddle(proto, weight, save_dir, caffe_proto):
...
@@ -112,12 +119,16 @@ def caffe2paddle(proto, weight, save_dir, caffe_proto):
def
main
():
def
main
():
if
len
(
sys
.
argv
)
<
2
:
if
len
(
sys
.
argv
)
<
2
:
print
(
"Use
\"
x2paddle -h
\"
to print the help information"
)
print
(
"Use
\"
x2paddle -h
\"
to print the help information
\n
"
)
return
return
parser
=
arg_parser
()
parser
=
arg_parser
()
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
if
args
.
version
:
print
(
"x2paddle-{} with python>=3.5
\n
"
.
format
(
x2paddle
.
__version__
))
return
try
:
try
:
import
paddle
import
paddle
v0
,
v1
,
v2
=
paddle
.
__version__
.
split
(
'.'
)
v0
,
v1
,
v2
=
paddle
.
__version__
.
split
(
'.'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录