Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
afeixing77
Paddle
提交
8e14d8f9
P
Paddle
项目概览
afeixing77
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e14d8f9
编写于
3月 26, 2019
作者:
D
dongdaxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add data_generator package into setup.py
上级
17790188
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
16 deletion
+21
-16
python/paddle/fluid/__init__.py
python/paddle/fluid/__init__.py
+4
-0
python/paddle/fluid/executor.py
python/paddle/fluid/executor.py
+3
-3
python/paddle/fluid/trainer_desc.py
python/paddle/fluid/trainer_desc.py
+9
-9
python/paddle/fluid/trainer_factory.py
python/paddle/fluid/trainer_factory.py
+4
-4
python/setup.py.in
python/setup.py.in
+1
-0
未找到文件。
python/paddle/fluid/__init__.py
浏览文件 @
8e14d8f9
...
...
@@ -72,7 +72,11 @@ Tensor = LoDTensor
__all__
=
framework
.
__all__
+
executor
.
__all__
+
\
trainer_desc
.
__all__
+
inferencer
.
__all__
+
transpiler
.
__all__
+
\
parallel_executor
.
__all__
+
lod_tensor
.
__all__
+
\
<<<<<<<
HEAD
data_feed_desc
.
__all__
+
async_executor
.
__all__
+
compiler
.
__all__
+
[
=======
data_feed_desc
.
__all__
+
async_executor
.
__all__
+
compiler
.
__all__
+
[
>>>>>>>
add
data_generator
package
into
setup
.
py
'io'
,
'initializer'
,
'layers'
,
...
...
python/paddle/fluid/executor.py
浏览文件 @
8e14d8f9
...
...
@@ -654,7 +654,7 @@ class Executor(object):
trainer
.
_set_thread
(
thread
)
trainer
.
_set_debug
(
debug
)
trainer
.
_set_fetch_var_and_info
(
fetch_list
,
fetch_info
,
print_period
)
return
trainer
return
scope
,
trainer
def
infer_from_dataset
(
self
,
program
=
None
,
...
...
@@ -702,7 +702,7 @@ class Executor(object):
dataset=dataset)
"""
trainer
=
self
.
_prepare_trainer
(
scope
,
trainer
=
self
.
_prepare_trainer
(
program
=
program
,
dataset
=
dataset
,
scope
=
scope
,
...
...
@@ -775,7 +775,7 @@ class Executor(object):
"""
trainer
=
self
.
_prepare_trainer
(
scope
,
trainer
=
self
.
_prepare_trainer
(
program
=
program
,
dataset
=
dataset
,
scope
=
scope
,
...
...
python/paddle/fluid/trainer_desc.py
浏览文件 @
8e14d8f9
...
...
@@ -75,14 +75,14 @@ class MultiTrainer(TrainerDesc):
pass
def
_set_program
(
self
,
program
):
super
(
MultiTrainer
,
self
).
set_program
(
program
)
super
(
MultiTrainer
,
self
).
_
set_program
(
program
)
self
.
program_
=
program
def
_gen_trainer_desc
(
self
):
super
(
MultiTrainer
,
self
).
gen_trainer_desc
()
super
(
MultiTrainer
,
self
).
_
gen_trainer_desc
()
self
.
proto_desc
.
class_name
=
"MultiTrainer"
self
.
device_worker_
.
set_infer
(
self
.
infer_
)
self
.
device_worker_
.
gen_worker_desc
(
self
.
proto_desc
)
self
.
device_worker_
.
_
set_infer
(
self
.
infer_
)
self
.
device_worker_
.
_
gen_worker_desc
(
self
.
proto_desc
)
class
DistMultiTrainer
(
TrainerDesc
):
...
...
@@ -91,14 +91,14 @@ class DistMultiTrainer(TrainerDesc):
pass
def
_set_program
(
self
,
program
):
super
(
DistMultiTrainer
,
self
).
set_program
(
program
)
super
(
DistMultiTrainer
,
self
).
_
set_program
(
program
)
self
.
program_
=
program
def
_gen_trainer_desc
(
self
):
super
(
DistMultiTrainer
,
self
).
gen_trainer_desc
()
super
(
DistMultiTrainer
,
self
).
_
gen_trainer_desc
()
self
.
proto_desc
.
class_name
=
"DistMultiTrainer"
if
self
.
program_
==
None
:
print
(
"None program"
)
self
.
device_worker_
.
set_infer
(
self
.
infer_
)
self
.
device_worker_
.
set_program
(
self
.
program_
)
self
.
device_worker_
.
gen_worker_desc
(
self
.
proto_desc
)
self
.
device_worker_
.
_
set_infer
(
self
.
infer_
)
self
.
device_worker_
.
_
set_program
(
self
.
program_
)
self
.
device_worker_
.
_
gen_worker_desc
(
self
.
proto_desc
)
python/paddle/fluid/trainer_factory.py
浏览文件 @
8e14d8f9
...
...
@@ -29,13 +29,13 @@ class TrainerFactory(object):
# default is MultiTrainer + Hogwild
trainer
=
MultiTrainer
()
device_worker
=
Hogwild
()
trainer
.
set_device_worker
(
device_worker
)
trainer
.
_
set_device_worker
(
device_worker
)
else
:
trainer_class
=
opt_info
[
"trainer"
]
device_worker_class
=
opt_info
[
"device_worker"
]
trainer
=
globals
()[
trainer_class
]()
device_worker
=
globals
()[
device_worker_class
]()
device_worker
.
set_fleet_desc
(
opt_info
[
"fleet_desc"
])
trainer
.
set_device_worker
(
device_worker
)
trainer
.
set_fleet_desc
(
opt_info
[
"fleet_desc"
])
device_worker
.
_
set_fleet_desc
(
opt_info
[
"fleet_desc"
])
trainer
.
_
set_device_worker
(
device_worker
)
trainer
.
_
set_fleet_desc
(
opt_info
[
"fleet_desc"
])
return
trainer
python/setup.py.in
浏览文件 @
8e14d8f9
...
...
@@ -122,6 +122,7 @@ packages=['paddle',
'paddle.fluid.transpiler',
'paddle.fluid.transpiler.details',
'paddle.fluid.incubate',
'paddle.fluid.incubate.data_generator',
'paddle.fluid.incubate.fleet',
'paddle.fluid.incubate.fleet.base',
'paddle.fluid.incubate.fleet.parameter_server',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录