Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
ca97d6ac
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
10
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
23
列表
看板
标记
里程碑
合并请求
111
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FluidDoc
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
23
Issue
23
列表
看板
标记
里程碑
合并请求
111
合并请求
111
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
ca97d6ac
编写于
2月 24, 2020
作者:
M
mamingjie-China
提交者:
GitHub
2月 24, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the doc in elementwise_add elementwise_sub elementwise_mul elementwise_div (#1762)
Add the override function in the elementwise ops
上级
4f93ae3d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
4 deletion
+16
-4
doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst
doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst
+4
-1
doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst
doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst
+4
-1
doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst
doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst
+4
-1
doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst
doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst
+4
-1
未找到文件。
doc/fluid/api_cn/layers_cn/elementwise_add_cn.rst
浏览文件 @
ca97d6ac
...
@@ -61,11 +61,12 @@ elementwise_add
...
@@ -61,11 +61,12 @@ elementwise_add
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_add(x, y)
z = fluid.layers.elementwise_add(x, y)
# z = x + y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
fetch_list=[z.name])
fetch_list=[z.name])
print(z_value) #[3., 8., 6.]
print(z_value) #
[3., 8., 6.]
**代码示例 2**
**代码示例 2**
...
@@ -81,6 +82,7 @@ elementwise_add
...
@@ -81,6 +82,7 @@ elementwise_add
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_add(x, y, axis=1)
z = fluid.layers.elementwise_add(x, y, axis=1)
# z = x + y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
@@ -100,6 +102,7 @@ elementwise_add
...
@@ -100,6 +102,7 @@ elementwise_add
}
}
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
# z = x + y
z = fluid.layers.elementwise_add(x, y, axis=3)
z = fluid.layers.elementwise_add(x, y, axis=3)
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
...
...
doc/fluid/api_cn/layers_cn/elementwise_div_cn.rst
浏览文件 @
ca97d6ac
...
@@ -61,11 +61,12 @@ elementwise_div
...
@@ -61,11 +61,12 @@ elementwise_div
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_div(x, y)
z = fluid.layers.elementwise_div(x, y)
# z = x / y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
fetch_list=[z.name])
fetch_list=[z.name])
print(z_value) #[2., 0.6, 2.]
print(z_value) #
[2., 0.6, 2.]
**代码示例 2**
**代码示例 2**
...
@@ -81,6 +82,7 @@ elementwise_div
...
@@ -81,6 +82,7 @@ elementwise_div
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_div(x, y, axis=1)
z = fluid.layers.elementwise_div(x, y, axis=1)
# z = x / y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
@@ -101,6 +103,7 @@ elementwise_div
...
@@ -101,6 +103,7 @@ elementwise_div
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_div(x, y, axis=3)
z = fluid.layers.elementwise_div(x, y, axis=3)
# z = x / y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
...
doc/fluid/api_cn/layers_cn/elementwise_mul_cn.rst
浏览文件 @
ca97d6ac
...
@@ -61,11 +61,12 @@ elementwise_mul
...
@@ -61,11 +61,12 @@ elementwise_mul
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_mul(x, y)
z = fluid.layers.elementwise_mul(x, y)
# z = x * y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
fetch_list=[z.name])
fetch_list=[z.name])
print(z_value) #[2., 15., 8.]
print(z_value) #
[2., 15., 8.]
**代码示例 2**
**代码示例 2**
...
@@ -81,6 +82,7 @@ elementwise_mul
...
@@ -81,6 +82,7 @@ elementwise_mul
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_mul(x, y, axis=1)
z = fluid.layers.elementwise_mul(x, y, axis=1)
# z = x * y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
@@ -101,6 +103,7 @@ elementwise_mul
...
@@ -101,6 +103,7 @@ elementwise_mul
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_mul(x, y, axis=3)
z = fluid.layers.elementwise_mul(x, y, axis=3)
# z = x * y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
...
doc/fluid/api_cn/layers_cn/elementwise_sub_cn.rst
浏览文件 @
ca97d6ac
...
@@ -61,11 +61,12 @@ elementwise_sub
...
@@ -61,11 +61,12 @@ elementwise_sub
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
x = fluid.layers.data(name="x", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
y = fluid.layers.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_sub(x, y)
z = fluid.layers.elementwise_sub(x, y)
# z = x - y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
fetch_list=[z.name])
fetch_list=[z.name])
print(z_value) #[1., -2., 2.]
print(z_value) #
[1., -2., 2.]
**代码示例 2**
**代码示例 2**
...
@@ -81,6 +82,7 @@ elementwise_sub
...
@@ -81,6 +82,7 @@ elementwise_sub
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_sub(x, y, axis=1)
z = fluid.layers.elementwise_sub(x, y, axis=1)
# z = x - y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
@@ -101,6 +103,7 @@ elementwise_sub
...
@@ -101,6 +103,7 @@ elementwise_sub
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
x = fluid.layers.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
y = fluid.layers.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_sub(x, y, axis=3)
z = fluid.layers.elementwise_sub(x, y, axis=3)
# z = x - y
place = fluid.CPUPlace()
place = fluid.CPUPlace()
exe = fluid.Executor(place)
exe = fluid.Executor(place)
z_value = exe.run(feed=gen_data(),
z_value = exe.run(feed=gen_data(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录