Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
6ce87bf9
P
Paddle
项目概览
机器未来
/
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看板
提交
6ce87bf9
编写于
10月 09, 2019
作者:
D
danleifeng
提交者:
gongweibao
10月 09, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[cherry-pick 1.6] fix code example of elementwise op in en_doc (#20322)
上级
538f028e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
55 deletion
+55
-55
paddle/fluid/API.spec
paddle/fluid/API.spec
+7
-7
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+48
-48
未找到文件。
paddle/fluid/API.spec
浏览文件 @
6ce87bf9
...
...
@@ -247,13 +247,13 @@ paddle.fluid.layers.unique_with_counts (ArgSpec(args=['x', 'dtype'], varargs=Non
paddle.fluid.layers.expand (ArgSpec(args=['x', 'expand_times', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '7b97042c3ba55fb5fec6a06308523b73'))
paddle.fluid.layers.sequence_concat (ArgSpec(args=['input', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', 'b992616c1afbd6b0c2a897ac23036381'))
paddle.fluid.layers.scale (ArgSpec(args=['x', 'scale', 'bias', 'bias_after_scale', 'act', 'name'], varargs=None, keywords=None, defaults=(1.0, 0.0, True, None, None)), ('document', '463e4713806e5adaa4d20a41e2218453'))
paddle.fluid.layers.elementwise_add (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
77ab8a79746ce9b96625c6195c27dfbd
'))
paddle.fluid.layers.elementwise_div (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
128d140ac78c610c35fc38663baf9654
'))
paddle.fluid.layers.elementwise_sub (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
061219cf5a710c090eb5b31d0a0d841d
'))
paddle.fluid.layers.elementwise_mul (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '5
7d99bd329b8ea842802a7ea52724163
'))
paddle.fluid.layers.elementwise_max (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
3b3c2e528712552f6f44aef88796321d
'))
paddle.fluid.layers.elementwise_min (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
817e8ce2b39de9b4a94b1b6d592144e0
'))
paddle.fluid.layers.elementwise_pow (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
b5e3964c8711058634cf5b57b4884258
'))
paddle.fluid.layers.elementwise_add (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
0c9c260e7738165a099f6a76da0b7814
'))
paddle.fluid.layers.elementwise_div (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
4701ffd4eb4b7ee19756d3b90532c5f2
'))
paddle.fluid.layers.elementwise_sub (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
eab2518a801f3f393cf38fddc899c941
'))
paddle.fluid.layers.elementwise_mul (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '5
6838de6feabe4e5eef4f58c841eed11
'))
paddle.fluid.layers.elementwise_max (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
27e1e1604433f85cd7c4c320cb7b9a5f
'))
paddle.fluid.layers.elementwise_min (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
cdbfe2042da18b0e2a2fd79fde944dc2
'))
paddle.fluid.layers.elementwise_pow (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '
6fc5d7492830d60c7fa61b3bc8f0d7e7
'))
paddle.fluid.layers.elementwise_mod (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '4101ee1f9280f00dce54054ccc434890'))
paddle.fluid.layers.elementwise_floordiv (ArgSpec(args=['x', 'y', 'axis', 'act', 'name'], varargs=None, keywords=None, defaults=(-1, None, None)), ('document', '67e6101c31314d4082621e8e443cfb68'))
paddle.fluid.layers.uniform_random_batch_size_like (ArgSpec(args=['input', 'shape', 'dtype', 'input_dim_idx', 'output_dim_idx', 'min', 'max', 'seed'], varargs=None, keywords=None, defaults=('float32', 0, 0, -1.0, 1.0, 0)), ('document', 'cfa120e583cd4a5bfa120c8a26f98a28'))
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
6ce87bf9
...
...
@@ -12285,12 +12285,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_add(x, y)
place = fluid.CPUPlace()
...
...
@@ -12312,8 +12312,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_add(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12336,8 +12336,8 @@ Examples:
"y": np.random.randint(1, 5, size=[5]).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.
data(name="y", shape=[5
], dtype='float32')
z = fluid.layers.elementwise_add(x, y, axis=3)
place = fluid.CPUPlace()
...
...
@@ -12362,12 +12362,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_div(x, y)
place = fluid.CPUPlace()
...
...
@@ -12389,8 +12389,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_div(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12413,8 +12413,8 @@ Examples:
"y": np.random.randint(1, 5, size=[5]).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.
data(name="y", shape=[5
], dtype='float32')
z = fluid.layers.elementwise_div(x, y, axis=3)
place = fluid.CPUPlace()
...
...
@@ -12439,12 +12439,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_sub(x, y)
place = fluid.CPUPlace()
...
...
@@ -12466,8 +12466,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_sub(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12490,8 +12490,8 @@ Examples:
"y": np.random.randint(1, 5, size=[5]).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.
data(name="y", shape=[5
], dtype='float32')
z = fluid.layers.elementwise_sub(x, y, axis=3)
place = fluid.CPUPlace()
...
...
@@ -12516,12 +12516,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_mul(x, y)
place = fluid.CPUPlace()
...
...
@@ -12543,8 +12543,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_mul(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12567,8 +12567,8 @@ Examples:
"y": np.random.randint(1, 5, size=[5]).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.
data(name="y", shape=[5
], dtype='float32')
z = fluid.layers.elementwise_mul(x, y, axis=3)
place = fluid.CPUPlace()
...
...
@@ -12593,12 +12593,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_max(x, y)
place = fluid.CPUPlace()
...
...
@@ -12620,8 +12620,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_max(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12647,12 +12647,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_max(x, y)
place = fluid.CPUPlace()
...
...
@@ -12673,8 +12673,8 @@ Examples:
"y": np.zeros((3, 4)).astype('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')
x = fluid.data(name="x", shape=[2,3,4,5], dtype='float32')
y = fluid.data(name="y", shape=[3,4], dtype='float32')
z = fluid.layers.elementwise_max(x, y, axis=1)
place = fluid.CPUPlace()
...
...
@@ -12700,12 +12700,12 @@ Examples:
def gen_data():
return {
"x": np.array([2, 3, 4]),
"y": np.array([1, 5, 2])
"x": np.array([2, 3, 4])
.astype('float32')
,
"y": np.array([1, 5, 2])
.astype('float32')
}
x = fluid.
layers.
data(name="x", shape=[3], dtype='float32')
y = fluid.
layers.
data(name="y", shape=[3], dtype='float32')
x = fluid.data(name="x", shape=[3], dtype='float32')
y = fluid.data(name="y", shape=[3], dtype='float32')
z = fluid.layers.elementwise_pow(x, y)
place = fluid.CPUPlace()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录