Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
76941990
P
Paddle
项目概览
Crayon鑫
/
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看板
提交
76941990
编写于
6月 11, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine docs of elementwise_op etc.
上级
b3fd9da6
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
14 addition
and
13 deletion
+14
-13
paddle/fluid/operators/elementwise_op.h
paddle/fluid/operators/elementwise_op.h
+12
-11
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+2
-2
未找到文件。
paddle/fluid/operators/elementwise_op.h
浏览文件 @
76941990
...
...
@@ -72,23 +72,24 @@ The equation is:
$$%s$$
$X$ is a tensor of any dimension
and the dimensions of tensor $Y$
must be
smaller
than or equal to the dimensions of $X$.
$X$ is a tensor of any dimension
. And $Y$ is a tensor whose dimensions
must be
less
than or equal to the dimensions of $X$.
There are two cases for this operator:
1. The shape of $Y$ is same with $X$;
2. The shape of $Y$ is a congiguous subsequencet of $X$. The trailing dimensions
of size 1 for $Y$ will be ignored for the consideration of subsequence.
1. The shape of $Y$ is the same with $X$.
2. The shape of $Y$ is a continuous subsequence of $X$.
For case 2:
$Y$ will be broadcasted to match the shape of $X$ and axis should be
set to index of the start dimension to broadcast $Y$ onto $X$.
1. Broadcast $Y$ to match the shape of $X$, where $axis$ is the start dimension index
for broadcasting $Y$ onto $X$.
2. If $axis$ is -1 (default), $axis = rank(X) - rank(Y)$.
3. The trailing dimensions of size 1 for $Y$ will be ignored for the consideration of
subsequence, such as shape(Y) = (2, 1) => (2).
If axis is -1, it is treated as axis=rank(X)-rank(Y).
For example:
For example
.. code-block:: python
shape(X) = (2, 3, 4, 5), shape(Y) = (,)
...
...
@@ -98,8 +99,8 @@ For example
shape(X) = (2, 3, 4, 5), shape(Y) = (2), with axis=0
shape(X) = (2, 3, 4, 5), shape(Y) = (2, 1), with axis=0
Either of the inputs $X$ and $Y$ or none can carry the LoD (Level of Details)
information. However, the output only shares the LoD information with
input $X$.
The inputs $X$ and $Y$ can carry the different LoD information.
But the output only shares the LoD information with the
input $X$.
)DOC"
,
GetName
(),
GetEquation
()));
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
76941990
...
...
@@ -1409,7 +1409,7 @@ def sequence_pool(input, pool_type):
def
sequence_first_step
(
input
):
"""
This func
it
on get the first step of sequence.
This func
ti
on get the first step of sequence.
.. code-block:: text
...
...
@@ -1442,7 +1442,7 @@ def sequence_first_step(input):
def
sequence_last_step
(
input
):
"""
This func
it
on get the last step of sequence.
This func
ti
on get the last step of sequence.
.. code-block:: text
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录