Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
408bd8b8
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
408bd8b8
编写于
10月 10, 2019
作者:
X
xujiaqi01
提交者:
GitHub
10月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix en doc and test=document_fix (#20441)
* fix en doc train_from_dataset and infer_from_datatset
上级
76a58197
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
33 addition
and
26 deletion
+33
-26
paddle/fluid/API.spec
paddle/fluid/API.spec
+2
-2
python/paddle/fluid/executor.py
python/paddle/fluid/executor.py
+31
-24
未找到文件。
paddle/fluid/API.spec
浏览文件 @
408bd8b8
...
@@ -30,9 +30,9 @@ paddle.fluid.load_op_library (ArgSpec(args=['lib_filename'], varargs=None, keywo
...
@@ -30,9 +30,9 @@ paddle.fluid.load_op_library (ArgSpec(args=['lib_filename'], varargs=None, keywo
paddle.fluid.Executor ('paddle.fluid.executor.Executor', ('document', '4d963107d87438b5add4a5288855bd04'))
paddle.fluid.Executor ('paddle.fluid.executor.Executor', ('document', '4d963107d87438b5add4a5288855bd04'))
paddle.fluid.Executor.__init__ (ArgSpec(args=['self', 'place'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
paddle.fluid.Executor.__init__ (ArgSpec(args=['self', 'place'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
paddle.fluid.Executor.close (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', '90b3268b71a8aceedd0dc9e311921d15'))
paddle.fluid.Executor.close (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', '90b3268b71a8aceedd0dc9e311921d15'))
paddle.fluid.Executor.infer_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', '
4ff256774ecaeee01c840a5fb5de8f7a
'))
paddle.fluid.Executor.infer_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', '
67de8ce7fbc618da50037d33cf7a7dbc
'))
paddle.fluid.Executor.run (ArgSpec(args=['self', 'program', 'feed', 'fetch_list', 'feed_var_name', 'fetch_var_name', 'scope', 'return_numpy', 'use_program_cache'], varargs=None, keywords=None, defaults=(None, None, None, 'feed', 'fetch', None, True, False)), ('document', 'de3878f012e60edad05fb24fd88ce910'))
paddle.fluid.Executor.run (ArgSpec(args=['self', 'program', 'feed', 'fetch_list', 'feed_var_name', 'fetch_var_name', 'scope', 'return_numpy', 'use_program_cache'], varargs=None, keywords=None, defaults=(None, None, None, 'feed', 'fetch', None, True, False)), ('document', 'de3878f012e60edad05fb24fd88ce910'))
paddle.fluid.Executor.train_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', '
73024c79f46b4f14f1060edeaa4919c8
'))
paddle.fluid.Executor.train_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', '
f35879c6935d87255d4317c7d0d02ab6
'))
paddle.fluid.global_scope (ArgSpec(args=[], varargs=None, keywords=None, defaults=None), ('document', 'f65788d9ead293ada47551339df12203'))
paddle.fluid.global_scope (ArgSpec(args=[], varargs=None, keywords=None, defaults=None), ('document', 'f65788d9ead293ada47551339df12203'))
paddle.fluid.scope_guard (ArgSpec(args=['scope'], varargs=None, keywords=None, defaults=None), ('document', '02fcfc1eda07c03a84ed62422366239c'))
paddle.fluid.scope_guard (ArgSpec(args=['scope'], varargs=None, keywords=None, defaults=None), ('document', '02fcfc1eda07c03a84ed62422366239c'))
paddle.fluid.DistributeTranspiler ('paddle.fluid.transpiler.distribute_transpiler.DistributeTranspiler', ('document', 'b2b19821c5dffcd11473d6a4eef089af'))
paddle.fluid.DistributeTranspiler ('paddle.fluid.transpiler.distribute_transpiler.DistributeTranspiler', ('document', 'b2b19821c5dffcd11473d6a4eef089af'))
...
...
python/paddle/fluid/executor.py
浏览文件 @
408bd8b8
...
@@ -1048,11 +1048,17 @@ class Executor(object):
...
@@ -1048,11 +1048,17 @@ class Executor(object):
print_period
=
100
,
print_period
=
100
,
fetch_handler
=
None
):
fetch_handler
=
None
):
"""
"""
The document of infer_from_dataset is almost the same as
Infer from a pre-defined Dataset. Dataset is defined in paddle.fluid.dataset.
train_from_dataset, except that in distributed training,
Given a program, either a program or compiled program, infer_from_dataset will
push gradients will be disabled in infer_from_dataset.
consume all data samples in dataset. Input scope can be given by users. By default,
infer_from_dataset() can be used for evaluation in multi-thread
scope is global_scope(). The total number of thread run in training is `thread`.
very easily.
Thread number used in training will be minimum value of threadnum in Dataset and
the value of thread in this interface. Debug can be set so that executor will display
Run-Time for all operators and the throughputs of current infer task.
The document of infer_from_dataset is almost the same as train_from_dataset,
except that in distributed training, push gradients will be disabled in infer_from_dataset.
infer_from_dataset() can be used for evaluation in multi-threadvery easily.
Args:
Args:
program(Program|CompiledProgram): the program that needs to be run,
program(Program|CompiledProgram): the program that needs to be run,
...
@@ -1062,11 +1068,11 @@ class Executor(object):
...
@@ -1062,11 +1068,11 @@ class Executor(object):
Please check the document of Dataset if needed. default is None
Please check the document of Dataset if needed. default is None
scope(Scope): the scope used to run this program, you can switch it to different scope
scope(Scope): the scope used to run this program, you can switch it to different scope
for each run. default is global_scope
for each run. default is global_scope
thread(int): number of thread a user wants to run in this function.
The actual number
thread(int): number of thread a user wants to run in this function.
Default is 0, which
of thread will be min(Dataset.thread_num, thread) if thread > 0, default is 0
means using thread num of dataset
debug(bool): whether a user wants to run infer_from_dataset, default is False
debug(bool): whether a user wants to run infer_from_dataset, default is False
fetch_list(Variable List): fetch variable list, each variable
fetch_list(Variable List): fetch variable list, each variable
will be printed during
will be printed during
training, default is None
training, default is None
fetch_info(String List): print information for each variable, default is None
fetch_info(String List): print information for each variable, default is None
print_period(int): the number of mini-batches for each print, default is 100
print_period(int): the number of mini-batches for each print, default is 100
fetch_handler(FetchHandler): a user define class for fetch output.
fetch_handler(FetchHandler): a user define class for fetch output.
...
@@ -1127,13 +1133,14 @@ class Executor(object):
...
@@ -1127,13 +1133,14 @@ class Executor(object):
Please check the document of Dataset if needed.
Please check the document of Dataset if needed.
scope(Scope): the scope used to run this program, you can switch it to different scope
scope(Scope): the scope used to run this program, you can switch it to different scope
for each run. default is global_scope
for each run. default is global_scope
thread(int): number of thread a user wants to run in this function.
The actual number
thread(int): number of thread a user wants to run in this function.
Default is 0, which
of thread will be min(Dataset.thread_num, thread)
means using thread num of dataset
debug(bool): whether a user wants to run train_from_dataset
debug(bool): whether a user wants to run train_from_dataset
fetch_list(Variable List): fetch variable list, each variable
fetch_list(Variable List): fetch variable list, each variable will be printed
will be printed during training
during training
fetch_info(String List): print information for each variable
fetch_info(String List): print information for each variable, its length should be equal
print_period(int): the number of mini-batches for each print
to fetch_list
print_period(int): the number of mini-batches for each print, default is 100
fetch_handler(FetchHandler): a user define class for fetch output.
fetch_handler(FetchHandler): a user define class for fetch output.
Returns:
Returns:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录