Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
51acd478
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
51acd478
编写于
2月 01, 2018
作者:
T
Travis CI
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Deploy to GitHub Pages:
2fb280c9
上级
f06f013e
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
110 addition
and
46 deletion
+110
-46
develop/doc/api/v2/fluid/io.html
develop/doc/api/v2/fluid/io.html
+54
-22
develop/doc/searchindex.js
develop/doc/searchindex.js
+1
-1
develop/doc_cn/api/v2/fluid/io.html
develop/doc_cn/api/v2/fluid/io.html
+54
-22
develop/doc_cn/searchindex.js
develop/doc_cn/searchindex.js
+1
-1
未找到文件。
develop/doc/api/v2/fluid/io.html
浏览文件 @
51acd478
...
...
@@ -222,7 +222,7 @@
<h2>
save_vars
<a
class=
"headerlink"
href=
"#save-vars"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save variables to directory by executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
...
...
@@ -239,10 +239,19 @@
</table>
<p>
program which fit
<cite>
predicate
</cite>
. Default default_main_program.
:param predicate: The Predicate describes a callable that returns a variable
as a bool. If it returns true, the
variables
will be saved.
:param vars: variables need to be saved. If
specify vars
, program
&
predicate
as a bool. If it returns true, the
corresponding input variable
will be saved.
:param vars: variables need to be saved. If
vars is specified
, program
&
predicate
will be ignored
:return: None
</p>
:param save_file_name: The name of a single file that all vars are saved to.
If it is None, save variables to separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
...
...
@@ -250,7 +259,7 @@ will be ignored
<h2>
save_params
<a
class=
"headerlink"
href=
"#save-params"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save all parameters to directory with executor.
</p>
</dd></dl>
...
...
@@ -259,7 +268,7 @@ will be ignored
<h2>
save_persistables
<a
class=
"headerlink"
href=
"#save-persistables"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save all persistables to directory with executor.
</p>
</dd></dl>
...
...
@@ -268,14 +277,14 @@ will be ignored
<h2>
load_vars
<a
class=
"headerlink"
href=
"#load-vars"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Load variables from directory by executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Parameters:
</th><td
class=
"field-body"
><ul
class=
"first last simple"
>
<li><strong>
executor
</strong>
–
executor that
save
variable
</li>
<li><strong>
executor
</strong>
–
executor that
load
variable
</li>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
main_program
</strong>
–
program. If vars is None, then filter all variables in this
</li>
</ul>
...
...
@@ -285,10 +294,19 @@ will be ignored
</table>
<p>
program which fit
<cite>
predicate
</cite>
. Default default_main_program().
:param predicate: The Predicate describes a callable that returns a variable
as a bool. If it returns true, the
variables
will be loaded.
:param vars: variables need to be loaded. If
specify vars
, program
&
as a bool. If it returns true, the
corresponding input variable
will be loaded.
:param vars: variables need to be loaded. If
vars is specified
, program
&
predicate will be ignored
:return: None
</p>
:param load_file_name: The name of the single file that all vars are loaded from.
If it is None, load variables from separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
...
...
@@ -296,7 +314,7 @@ predicate will be ignored
<h2>
load_params
<a
class=
"headerlink"
href=
"#load-params"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
load all parameters from directory by executor.
</p>
</dd></dl>
...
...
@@ -305,7 +323,7 @@ predicate will be ignored
<h2>
load_persistables
<a
class=
"headerlink"
href=
"#load-persistables"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
load all persistables from directory by executor.
</p>
</dd></dl>
...
...
@@ -314,25 +332,32 @@ predicate will be ignored
<h2>
save_inference_model
<a
class=
"headerlink"
href=
"#save-inference-model"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
feeded_var_names
</em>
,
<em>
target_vars
</em>
,
<em>
executor
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
feeded_var_names
</em>
,
<em>
target_vars
</em>
,
<em>
executor
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Build a model especially for inference,
and save it to directory by the executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Parameters:
</th><td
class=
"field-body"
><ul
class=
"first simple"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Parameters:
</th><td
class=
"field-body"
><ul
class=
"first
last
simple"
>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
feeded_var_names
</strong>
–
Names of variables that need to be feeded data during inference
</li>
<li><strong>
target_vars
</strong>
–
Variables from which we can get inference results.
</li>
<li><strong>
executor
</strong>
–
executor that save inference model
</li>
<li><strong>
main_program
</strong>
–
original program, which will be pruned to build the inference model.
Default default_main_program().
</li>
<li><strong>
save_file_name
</strong>
–
The name of a single file that all parameters are saved to.
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
><p
class=
"first last"
>
None
</p>
</td>
</tbody>
</table>
<p>
If it is None, save parameters to separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
...
...
@@ -343,23 +368,30 @@ Default default_main_program().</li>
<h2>
load_inference_model
<a
class=
"headerlink"
href=
"#load-inference-model"
title=
"Permalink to this headline"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
executor
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
executor
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Load inference model from a directory
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Parameters:
</th><td
class=
"field-body"
><ul
class=
"first simple"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Parameters:
</th><td
class=
"field-body"
><ul
class=
"first
last
simple"
>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
executor
</strong>
–
executor that load inference model
</li>
<li><strong>
load_file_name
</strong>
–
The name of the single file that all parameters are loaded from.
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
><p
class=
"first last"
>
[program, feed_target_names, fetch_targets]
</tbody>
</table>
<p>
If it is None, load parameters from separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
>
[program, feed_target_names, fetch_targets]
program: program especially for inference.
feed_target_names: Names of variables that need to feed data
fetch_targets: Variables from which we can get inference results.
</p>
</td>
fetch_targets: Variables from which we can get inference results.
</td>
</tr>
</tbody>
</table>
...
...
develop/doc/searchindex.js
浏览文件 @
51acd478
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
develop/doc_cn/api/v2/fluid/io.html
浏览文件 @
51acd478
...
...
@@ -241,7 +241,7 @@
<h2>
save_vars
<a
class=
"headerlink"
href=
"#save-vars"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save variables to directory by executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
...
...
@@ -258,10 +258,19 @@
</table>
<p>
program which fit
<cite>
predicate
</cite>
. Default default_main_program.
:param predicate: The Predicate describes a callable that returns a variable
as a bool. If it returns true, the
variables
will be saved.
:param vars: variables need to be saved. If
specify vars
, program
&
predicate
as a bool. If it returns true, the
corresponding input variable
will be saved.
:param vars: variables need to be saved. If
vars is specified
, program
&
predicate
will be ignored
:return: None
</p>
:param save_file_name: The name of a single file that all vars are saved to.
If it is None, save variables to separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
...
...
@@ -269,7 +278,7 @@ will be ignored
<h2>
save_params
<a
class=
"headerlink"
href=
"#save-params"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save all parameters to directory with executor.
</p>
</dd></dl>
...
...
@@ -278,7 +287,7 @@ will be ignored
<h2>
save_persistables
<a
class=
"headerlink"
href=
"#save-persistables"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Save all persistables to directory with executor.
</p>
</dd></dl>
...
...
@@ -287,14 +296,14 @@ will be ignored
<h2>
load_vars
<a
class=
"headerlink"
href=
"#load-vars"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_vars
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
vars=None
</em>
,
<em>
predicate=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Load variables from directory by executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
参数:
</th><td
class=
"field-body"
><ul
class=
"first last simple"
>
<li><strong>
executor
</strong>
–
executor that
save
variable
</li>
<li><strong>
executor
</strong>
–
executor that
load
variable
</li>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
main_program
</strong>
–
program. If vars is None, then filter all variables in this
</li>
</ul>
...
...
@@ -304,10 +313,19 @@ will be ignored
</table>
<p>
program which fit
<cite>
predicate
</cite>
. Default default_main_program().
:param predicate: The Predicate describes a callable that returns a variable
as a bool. If it returns true, the
variables
will be loaded.
:param vars: variables need to be loaded. If
specify vars
, program
&
as a bool. If it returns true, the
corresponding input variable
will be loaded.
:param vars: variables need to be loaded. If
vars is specified
, program
&
predicate will be ignored
:return: None
</p>
:param load_file_name: The name of the single file that all vars are loaded from.
If it is None, load variables from separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
...
...
@@ -315,7 +333,7 @@ predicate will be ignored
<h2>
load_params
<a
class=
"headerlink"
href=
"#load-params"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_params
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
load all parameters from directory by executor.
</p>
</dd></dl>
...
...
@@ -324,7 +342,7 @@ predicate will be ignored
<h2>
load_persistables
<a
class=
"headerlink"
href=
"#load-persistables"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_persistables
</code><span
class=
"sig-paren"
>
(
</span><em>
executor
</em>
,
<em>
dirname
</em>
,
<em>
main_program=None
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
load all persistables from directory by executor.
</p>
</dd></dl>
...
...
@@ -333,25 +351,32 @@ predicate will be ignored
<h2>
save_inference_model
<a
class=
"headerlink"
href=
"#save-inference-model"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
feeded_var_names
</em>
,
<em>
target_vars
</em>
,
<em>
executor
</em>
,
<em>
main_program=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
save_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
feeded_var_names
</em>
,
<em>
target_vars
</em>
,
<em>
executor
</em>
,
<em>
main_program=None
</em>
,
<em>
save_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Build a model especially for inference,
and save it to directory by the executor.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
参数:
</th><td
class=
"field-body"
><ul
class=
"first simple"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
参数:
</th><td
class=
"field-body"
><ul
class=
"first
last
simple"
>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
feeded_var_names
</strong>
–
Names of variables that need to be feeded data during inference
</li>
<li><strong>
target_vars
</strong>
–
Variables from which we can get inference results.
</li>
<li><strong>
executor
</strong>
–
executor that save inference model
</li>
<li><strong>
main_program
</strong>
–
original program, which will be pruned to build the inference model.
Default default_main_program().
</li>
<li><strong>
save_file_name
</strong>
–
The name of a single file that all parameters are saved to.
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
><p
class=
"first last"
>
None
</p>
</td>
</tbody>
</table>
<p>
If it is None, save parameters to separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
>
None
</td>
</tr>
</tbody>
</table>
...
...
@@ -362,23 +387,30 @@ Default default_main_program().</li>
<h2>
load_inference_model
<a
class=
"headerlink"
href=
"#load-inference-model"
title=
"永久链接至标题"
>
¶
</a></h2>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
executor
</em><span
class=
"sig-paren"
>
)
</span></dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.io.
</code><code
class=
"descname"
>
load_inference_model
</code><span
class=
"sig-paren"
>
(
</span><em>
dirname
</em>
,
<em>
executor
</em>
,
<em>
load_file_name=None
</em>
<span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
Load inference model from a directory
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
参数:
</th><td
class=
"field-body"
><ul
class=
"first simple"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
参数:
</th><td
class=
"field-body"
><ul
class=
"first
last
simple"
>
<li><strong>
dirname
</strong>
–
directory path
</li>
<li><strong>
executor
</strong>
–
executor that load inference model
</li>
<li><strong>
load_file_name
</strong>
–
The name of the single file that all parameters are loaded from.
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
><p
class=
"first last"
>
[program, feed_target_names, fetch_targets]
</tbody>
</table>
<p>
If it is None, load parameters from separate files.
</p>
<table
class=
"docutils field-list"
frame=
"void"
rules=
"none"
>
<col
class=
"field-name"
/>
<col
class=
"field-body"
/>
<tbody
valign=
"top"
>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
>
[program, feed_target_names, fetch_targets]
program: program especially for inference.
feed_target_names: Names of variables that need to feed data
fetch_targets: Variables from which we can get inference results.
</p>
</td>
fetch_targets: Variables from which we can get inference results.
</td>
</tr>
</tbody>
</table>
...
...
develop/doc_cn/searchindex.js
浏览文件 @
51acd478
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录