Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
e1b45851
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
提交
e1b45851
编写于
12月 21, 2017
作者:
T
Travis CI
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Deploy to GitHub Pages:
ad979089
上级
ab4121f5
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
122 addition
and
10 deletion
+122
-10
develop/doc/api/v2/fluid/layers.html
develop/doc/api/v2/fluid/layers.html
+60
-4
develop/doc/searchindex.js
develop/doc/searchindex.js
+1
-1
develop/doc_cn/api/v2/fluid/layers.html
develop/doc_cn/api/v2/fluid/layers.html
+60
-4
develop/doc_cn/searchindex.js
develop/doc_cn/searchindex.js
+1
-1
未找到文件。
develop/doc/api/v2/fluid/layers.html
浏览文件 @
e1b45851
...
...
@@ -956,9 +956,34 @@ LOD_Tensor.</p>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.layers.
</code><code
class=
"descname"
>
fill_constant
</code><span
class=
"sig-paren"
>
(
</span><em>
shape
</em>
,
<em>
dtype
</em>
,
<em>
value
</em>
,
<em>
out=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
This function creates a tensor , with shape as mentioned in the input and
specified dtype and fills this up with a constant value that
comes in the input. It also sets the stop_gradient to be True.
</p>
<dd><p><strong>
fill_constant
</strong></p>
<p>
This function creates a tensor of specified
<em>
shape
</em>
and
<em>
dtype
</em>
, and initializes this with a constant supplied in
<em>
value
</em>
.
</p>
<p>
It also sets
<em>
stop_gradient
</em>
to True.
</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"
>
<li><strong>
shape
</strong>
(
<em>
tuple|list|None
</em>
)
–
Shape of output tensor
</li>
<li><strong>
dtype
</strong>
(
<em>
np.dtype|core.DataType|str
</em>
)
–
Data type of output tensor
</li>
<li><strong>
value
</strong>
(
<em>
float
</em>
)
–
Constant value to initialize the output tensor
</li>
<li><strong>
out
</strong>
(
<em>
Variable
</em>
)
–
Output Variable to initialize
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
><p
class=
"first"
>
The tensor variable storing the output
</p>
</td>
</tr>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Return type:
</th><td
class=
"field-body"
><p
class=
"first last"
>
Variable
</p>
</td>
</tr>
</tbody>
</table>
<p
class=
"rubric"
>
Examples
</p>
<div
class=
"highlight-python"
><div
class=
"highlight"
><pre><span></span><span
class=
"n"
>
data
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
fluid
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
layers
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
fill_constant
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
shape
</span><span
class=
"o"
>
=
</span><span
class=
"p"
>
[
</span><span
class=
"mi"
>
1
</span><span
class=
"p"
>
],
</span>
<span
class=
"n"
>
value
</span><span
class=
"o"
>
=
</span><span
class=
"mi"
>
0
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
dtype
</span><span
class=
"o"
>
=
</span><span
class=
"s1"
>
'
int64
'
</span><span
class=
"p"
>
)
</span>
</pre></div>
</div>
</dd></dl>
</div>
...
...
@@ -967,7 +992,38 @@ comes in the input. It also sets the stop_gradient to be True.</p>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.layers.
</code><code
class=
"descname"
>
fill_constant_batch_size_like
</code><span
class=
"sig-paren"
>
(
</span><em>
input
</em>
,
<em>
shape
</em>
,
<em>
dtype
</em>
,
<em>
value
</em>
,
<em>
input_dim_idx=0
</em>
,
<em>
output_dim_idx=0
</em><span
class=
"sig-paren"
>
)
</span></dt>
<dd></dd></dl>
<dd><p><strong>
fill_constant_batch_size_like
</strong></p>
<p>
This function creates a tensor of specified
<em>
shape
</em>
,
<em>
dtype
</em>
and batch size,
and initializes this with a constant supplied in
<em>
value
</em>
. The batch size is
obtained from the
<cite>
input
</cite>
tensor.
</p>
<p>
It also sets
<em>
stop_gradient
</em>
to True.
</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"
>
<li><strong>
input
</strong>
(
<em>
Variable
</em>
)
–
Tensor whose dimensions will be used to get batch size
</li>
<li><strong>
shape
</strong>
(
<em>
tuple|list|None
</em>
)
–
Shape of output tensor
</li>
<li><strong>
dtype
</strong>
(
<em>
np.dtype|core.DataType|str
</em>
)
–
Data type of output tensor
</li>
<li><strong>
value
</strong>
(
<em>
float
</em>
)
–
Constant value to initialize the output tensor
</li>
<li><strong>
input_dim_idx
</strong>
(
<em>
int
</em>
)
–
Index of input
’
s batch size dimension
</li>
<li><strong>
output_dim_idx
</strong>
(
<em>
int
</em>
)
–
Index of output
’
s batch size dimension
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
Returns:
</th><td
class=
"field-body"
><p
class=
"first"
>
The tensor variable storing the output
</p>
</td>
</tr>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
Return type:
</th><td
class=
"field-body"
><p
class=
"first last"
>
Variable
</p>
</td>
</tr>
</tbody>
</table>
<p
class=
"rubric"
>
Examples
</p>
<div
class=
"highlight-python"
><div
class=
"highlight"
><pre><span></span><span
class=
"n"
>
data
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
fluid
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
layers
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
fill_constant
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
shape
</span><span
class=
"o"
>
=
</span><span
class=
"p"
>
[
</span><span
class=
"mi"
>
1
</span><span
class=
"p"
>
],
</span>
<span
class=
"n"
>
value
</span><span
class=
"o"
>
=
</span><span
class=
"mi"
>
0
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
dtype
</span><span
class=
"o"
>
=
</span><span
class=
"s1"
>
'
int64
'
</span><span
class=
"p"
>
)
</span>
</pre></div>
</div>
</dd></dl>
</div>
<div
class=
"section"
id=
"ones"
>
...
...
develop/doc/searchindex.js
浏览文件 @
e1b45851
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
develop/doc_cn/api/v2/fluid/layers.html
浏览文件 @
e1b45851
...
...
@@ -969,9 +969,34 @@ LOD_Tensor.</p>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.layers.
</code><code
class=
"descname"
>
fill_constant
</code><span
class=
"sig-paren"
>
(
</span><em>
shape
</em>
,
<em>
dtype
</em>
,
<em>
value
</em>
,
<em>
out=None
</em><span
class=
"sig-paren"
>
)
</span></dt>
<dd><p>
This function creates a tensor , with shape as mentioned in the input and
specified dtype and fills this up with a constant value that
comes in the input. It also sets the stop_gradient to be True.
</p>
<dd><p><strong>
fill_constant
</strong></p>
<p>
This function creates a tensor of specified
<em>
shape
</em>
and
<em>
dtype
</em>
, and initializes this with a constant supplied in
<em>
value
</em>
.
</p>
<p>
It also sets
<em>
stop_gradient
</em>
to True.
</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"
>
<li><strong>
shape
</strong>
(
<em>
tuple|list|None
</em>
)
–
Shape of output tensor
</li>
<li><strong>
dtype
</strong>
(
<em>
np.dtype|core.DataType|str
</em>
)
–
Data type of output tensor
</li>
<li><strong>
value
</strong>
(
<em>
float
</em>
)
–
Constant value to initialize the output tensor
</li>
<li><strong>
out
</strong>
(
<em>
Variable
</em>
)
–
Output Variable to initialize
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
><p
class=
"first"
>
The tensor variable storing the output
</p>
</td>
</tr>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回类型:
</th><td
class=
"field-body"
><p
class=
"first last"
>
Variable
</p>
</td>
</tr>
</tbody>
</table>
<p
class=
"rubric"
>
Examples
</p>
<div
class=
"highlight-python"
><div
class=
"highlight"
><pre><span></span><span
class=
"n"
>
data
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
fluid
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
layers
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
fill_constant
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
shape
</span><span
class=
"o"
>
=
</span><span
class=
"p"
>
[
</span><span
class=
"mi"
>
1
</span><span
class=
"p"
>
],
</span>
<span
class=
"n"
>
value
</span><span
class=
"o"
>
=
</span><span
class=
"mi"
>
0
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
dtype
</span><span
class=
"o"
>
=
</span><span
class=
"s1"
>
'
int64
'
</span><span
class=
"p"
>
)
</span>
</pre></div>
</div>
</dd></dl>
</div>
...
...
@@ -980,7 +1005,38 @@ comes in the input. It also sets the stop_gradient to be True.</p>
<dl
class=
"function"
>
<dt>
<code
class=
"descclassname"
>
paddle.v2.fluid.layers.
</code><code
class=
"descname"
>
fill_constant_batch_size_like
</code><span
class=
"sig-paren"
>
(
</span><em>
input
</em>
,
<em>
shape
</em>
,
<em>
dtype
</em>
,
<em>
value
</em>
,
<em>
input_dim_idx=0
</em>
,
<em>
output_dim_idx=0
</em><span
class=
"sig-paren"
>
)
</span></dt>
<dd></dd></dl>
<dd><p><strong>
fill_constant_batch_size_like
</strong></p>
<p>
This function creates a tensor of specified
<em>
shape
</em>
,
<em>
dtype
</em>
and batch size,
and initializes this with a constant supplied in
<em>
value
</em>
. The batch size is
obtained from the
<cite>
input
</cite>
tensor.
</p>
<p>
It also sets
<em>
stop_gradient
</em>
to True.
</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"
>
<li><strong>
input
</strong>
(
<em>
Variable
</em>
)
–
Tensor whose dimensions will be used to get batch size
</li>
<li><strong>
shape
</strong>
(
<em>
tuple|list|None
</em>
)
–
Shape of output tensor
</li>
<li><strong>
dtype
</strong>
(
<em>
np.dtype|core.DataType|str
</em>
)
–
Data type of output tensor
</li>
<li><strong>
value
</strong>
(
<em>
float
</em>
)
–
Constant value to initialize the output tensor
</li>
<li><strong>
input_dim_idx
</strong>
(
<em>
int
</em>
)
–
Index of input
’
s batch size dimension
</li>
<li><strong>
output_dim_idx
</strong>
(
<em>
int
</em>
)
–
Index of output
’
s batch size dimension
</li>
</ul>
</td>
</tr>
<tr
class=
"field-even field"
><th
class=
"field-name"
>
返回:
</th><td
class=
"field-body"
><p
class=
"first"
>
The tensor variable storing the output
</p>
</td>
</tr>
<tr
class=
"field-odd field"
><th
class=
"field-name"
>
返回类型:
</th><td
class=
"field-body"
><p
class=
"first last"
>
Variable
</p>
</td>
</tr>
</tbody>
</table>
<p
class=
"rubric"
>
Examples
</p>
<div
class=
"highlight-python"
><div
class=
"highlight"
><pre><span></span><span
class=
"n"
>
data
</span>
<span
class=
"o"
>
=
</span>
<span
class=
"n"
>
fluid
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
layers
</span><span
class=
"o"
>
.
</span><span
class=
"n"
>
fill_constant
</span><span
class=
"p"
>
(
</span><span
class=
"n"
>
shape
</span><span
class=
"o"
>
=
</span><span
class=
"p"
>
[
</span><span
class=
"mi"
>
1
</span><span
class=
"p"
>
],
</span>
<span
class=
"n"
>
value
</span><span
class=
"o"
>
=
</span><span
class=
"mi"
>
0
</span><span
class=
"p"
>
,
</span>
<span
class=
"n"
>
dtype
</span><span
class=
"o"
>
=
</span><span
class=
"s1"
>
'
int64
'
</span><span
class=
"p"
>
)
</span>
</pre></div>
</div>
</dd></dl>
</div>
<div
class=
"section"
id=
"ones"
>
...
...
develop/doc_cn/searchindex.js
浏览文件 @
e1b45851
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录