Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
f784dae3
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看板
提交
f784dae3
编写于
1月 10, 2018
作者:
A
Abhinav Arora
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the documentation for elementwise op in fluid layers
上级
020630b7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
13 deletion
+25
-13
doc/api/v2/fluid/layers.rst
doc/api/v2/fluid/layers.rst
+10
-0
paddle/operators/elementwise_add_op.cc
paddle/operators/elementwise_add_op.cc
+1
-1
paddle/operators/elementwise_div_op.cc
paddle/operators/elementwise_div_op.cc
+1
-1
paddle/operators/elementwise_mul_op.cc
paddle/operators/elementwise_mul_op.cc
+1
-1
paddle/operators/elementwise_op.h
paddle/operators/elementwise_op.h
+11
-9
paddle/operators/elementwise_sub_op.cc
paddle/operators/elementwise_sub_op.cc
+1
-1
未找到文件。
doc/api/v2/fluid/layers.rst
浏览文件 @
f784dae3
...
...
@@ -38,6 +38,16 @@ elementwise_add
.. autofunction:: paddle.v2.fluid.layers.elementwise_add
:noindex:
elementwise_sub
---------------
.. autofunction:: paddle.v2.fluid.layers.elementwise_sub
:noindex:
elementwise_mul
---------------
.. autofunction:: paddle.v2.fluid.layers.elementwise_mul
:noindex:
elementwise_div
---------------
.. autofunction:: paddle.v2.fluid.layers.elementwise_div
...
...
paddle/operators/elementwise_add_op.cc
浏览文件 @
f784dae3
...
...
@@ -21,7 +21,7 @@ class ElementwiseAddOpMaker : public ElementwiseOpMaker {
public:
ElementwiseAddOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Add"
,
"
$Out = X + Y$
"
);
SetComment
(
"Add"
,
"
Out = X + Y
"
);
AddComment
(
comment_
);
}
};
...
...
paddle/operators/elementwise_div_op.cc
浏览文件 @
f784dae3
...
...
@@ -21,7 +21,7 @@ class ElementwiseDivOpMaker : public ElementwiseOpMaker {
public:
ElementwiseDivOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Div"
,
"
$Out = X / Y$
"
);
SetComment
(
"Div"
,
"
Out = X / Y
"
);
AddComment
(
comment_
);
}
};
...
...
paddle/operators/elementwise_mul_op.cc
浏览文件 @
f784dae3
...
...
@@ -22,7 +22,7 @@ class ElementwiseMulOpMaker : public ElementwiseOpMaker {
public:
ElementwiseMulOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Mul"
,
"
$Out = X
\\
odot
\\
Y$
"
);
SetComment
(
"Mul"
,
"
Out = X
\\
odot
\\
Y
"
);
AddComment
(
comment_
);
}
};
...
...
paddle/operators/elementwise_op.h
浏览文件 @
f784dae3
...
...
@@ -58,7 +58,8 @@ Limited Elementwise {name} Operator.
The equation is:
{equation}
.. math::
{equation}
X is a tensor of any dimension and the dimensions of tensor Y must be smaller than
or equal to the dimensions of X.
...
...
@@ -71,15 +72,16 @@ For case 2:
Y will be broadcasted to match the shape of X and axis should be
the starting dimension index for broadcasting Y onto X.
example:
shape(X) = (2, 3, 4, 5), shape(Y) = (,)
shape(X) = (2, 3, 4, 5), shape(Y) = (5,)
shape(X) = (2, 3, 4, 5), shape(Y) = (4, 5)
shape(X) = (2, 3, 4, 5), shape(Y) = (3, 4), with axis=1
shape(X) = (2, 3, 4, 5), shape(Y) = (2), with axis=0
For example
.. code-block:: python
Both the input X and Y can carry the LoD (Level of Details) information,
or not. But the output only shares the LoD information with input X.
shape(X) = (2, 3, 4, 5), shape(Y) = (,)
shape(X) = (2, 3, 4, 5), shape(Y) = (5,)
shape(X) = (2, 3, 4, 5), shape(Y) = (4, 5)
shape(X) = (2, 3, 4, 5), shape(Y) = (3, 4), with axis=1
shape(X) = (2, 3, 4, 5), shape(Y) = (2), 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.
)DOC"
;
AddComment
(
comment_
);
...
...
paddle/operators/elementwise_sub_op.cc
浏览文件 @
f784dae3
...
...
@@ -21,7 +21,7 @@ class ElementwiseSubOpMaker : public ElementwiseOpMaker {
public:
ElementwiseSubOpMaker
(
OpProto
*
proto
,
OpAttrChecker
*
op_checker
)
:
ElementwiseOpMaker
(
proto
,
op_checker
)
{
SetComment
(
"Sub"
,
"
$Out = X - Y$
"
);
SetComment
(
"Sub"
,
"
Out = X - Y
"
);
AddComment
(
comment_
);
}
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录