Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
FluidDoc
提交
f2364d84
F
FluidDoc
项目概览
PaddlePaddle
/
FluidDoc
通知
5
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看板
未验证
提交
f2364d84
编写于
10月 10, 2019
作者:
W
wangchaochaohu
提交者:
GitHub
10月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix cn doc test=develop (#1490)
上级
678845bd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
12 deletion
+12
-12
doc/fluid/api_cn/layers_cn/equal_cn.rst
doc/fluid/api_cn/layers_cn/equal_cn.rst
+2
-2
doc/fluid/api_cn/layers_cn/reduce_max_cn.rst
doc/fluid/api_cn/layers_cn/reduce_max_cn.rst
+2
-2
doc/fluid/api_cn/layers_cn/reduce_mean_cn.rst
doc/fluid/api_cn/layers_cn/reduce_mean_cn.rst
+2
-2
doc/fluid/api_cn/layers_cn/reduce_min_cn.rst
doc/fluid/api_cn/layers_cn/reduce_min_cn.rst
+2
-2
doc/fluid/api_cn/layers_cn/reduce_prod_cn.rst
doc/fluid/api_cn/layers_cn/reduce_prod_cn.rst
+2
-2
doc/fluid/api_cn/layers_cn/reduce_sum_cn.rst
doc/fluid/api_cn/layers_cn/reduce_sum_cn.rst
+2
-2
未找到文件。
doc/fluid/api_cn/layers_cn/equal_cn.rst
浏览文件 @
f2364d84
...
...
@@ -23,13 +23,13 @@ equal
import paddle.fluid as fluid
import numpy as np
out_cond =fluid.
layers.data(name="input1", shape=[2], dtype='bool', append_batch_size=False
)
out_cond =fluid.
data(name="input1", shape=[2], dtype='bool'
)
label = fluid.layers.assign(np.array([3, 3], dtype="int32"))
limit = fluid.layers.assign(np.array([3, 2], dtype="int32"))
label_cond = fluid.layers.assign(np.array([1, 2], dtype="int32"))
out1 = fluid.layers.equal(x=label,y=limit) #out1=[True, False]
out2 = fluid.layers.equal(x=label_cond,y=limit,
out
=out_cond) #out2=[False, True] out_cond=[False, True]
out2 = fluid.layers.equal(x=label_cond,y=limit,
cond
=out_cond) #out2=[False, True] out_cond=[False, True]
...
...
doc/fluid/api_cn/layers_cn/reduce_max_cn.rst
浏览文件 @
f2364d84
...
...
@@ -26,7 +26,7 @@ reduce_max
# [[0.2, 0.3, 0.5, 0.9]
# [0.1, 0.2, 0.6, 0.7]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
x = fluid.
layers.
data(name='x', shape=[2, 4], dtype='float32')
x = fluid.data(name='x', shape=[2, 4], dtype='float32')
fluid.layers.reduce_max(x) # [0.9]
fluid.layers.reduce_max(x, dim=0) # [0.2, 0.3, 0.6, 0.9]
fluid.layers.reduce_max(x, dim=-1) # [0.9, 0.7]
...
...
@@ -36,7 +36,7 @@ reduce_max
# [[[1.0, 2.0], [3.0, 4.0]],
# [[5.0, 6.0], [7.0, 8.0]]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
y = fluid.
layers.
data(name='y', shape=[2, 2, 2], dtype='float32')
y = fluid.data(name='y', shape=[2, 2, 2], dtype='float32')
fluid.layers.reduce_max(y, dim=[1, 2]) # [4.0, 8.0]
fluid.layers.reduce_max(y, dim=[0, 1]) # [7.0, 8.0]
...
...
doc/fluid/api_cn/layers_cn/reduce_mean_cn.rst
浏览文件 @
f2364d84
...
...
@@ -26,7 +26,7 @@ reduce_mean
# [[0.2, 0.3, 0.5, 0.9]
# [0.1, 0.2, 0.6, 0.7]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
x = fluid.
layers.
data(name='x', shape=[2, 4], dtype='float32')
x = fluid.data(name='x', shape=[2, 4], dtype='float32')
fluid.layers.reduce_mean(x) # [0.4375]
fluid.layers.reduce_mean(x, dim=0) # [0.15, 0.25, 0.55, 0.8]
fluid.layers.reduce_mean(x, dim=-1) # [0.475, 0.4]
...
...
@@ -36,7 +36,7 @@ reduce_mean
# [[[1.0, 2.0], [3.0, 4.0]],
# [[5.0, 6.0], [7.0, 8.0]]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。。
y = fluid.
layers.
data(name='y', shape=[2, 2, 2], dtype='float32')
y = fluid.data(name='y', shape=[2, 2, 2], dtype='float32')
fluid.layers.reduce_mean(y, dim=[1, 2]) # [2.5, 6.5]
fluid.layers.reduce_mean(y, dim=[0, 1]) # [4.0, 5.0]
...
...
doc/fluid/api_cn/layers_cn/reduce_min_cn.rst
浏览文件 @
f2364d84
...
...
@@ -26,7 +26,7 @@ reduce_min
# [[0.2, 0.3, 0.5, 0.9]
# [0.1, 0.2, 0.6, 0.7]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
x = fluid.
layers.
data(name='x', shape=[2, 4], dtype='float32')
x = fluid.data(name='x', shape=[2, 4], dtype='float32')
fluid.layers.reduce_min(x) # [0.1]
fluid.layers.reduce_min(x, dim=0) # [0.1, 0.2, 0.5, 0.7]
fluid.layers.reduce_min(x, dim=-1) # [0.2, 0.1]
...
...
@@ -36,7 +36,7 @@ reduce_min
# [[[1.0, 2.0], [3.0, 4.0]],
# [[5.0, 6.0], [7.0, 8.0]]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
y = fluid.
layers.
data(name='y', shape=[2, 2, 2], dtype='float32')
y = fluid.data(name='y', shape=[2, 2, 2], dtype='float32')
fluid.layers.reduce_min(y, dim=[1, 2]) # [1.0, 5.0]
fluid.layers.reduce_min(y, dim=[0, 1]) # [1.0, 2.0]
...
...
doc/fluid/api_cn/layers_cn/reduce_prod_cn.rst
浏览文件 @
f2364d84
...
...
@@ -26,7 +26,7 @@ reduce_prod
# [[0.2, 0.3, 0.5, 0.9]
# [0.1, 0.2, 0.6, 0.7]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
x = fluid.
layers.
data(name='x', shape=[2, 4], dtype='float32')
x = fluid.data(name='x', shape=[2, 4], dtype='float32')
fluid.layers.reduce_prod(x) # [0.0002268]
fluid.layers.reduce_prod(x, dim=0) # [0.02, 0.06, 0.3, 0.63]
fluid.layers.reduce_prod(x, dim=-1) # [0.027, 0.0084]
...
...
@@ -37,7 +37,7 @@ reduce_prod
# [[[1.0, 2.0], [3.0, 4.0]],
# [[5.0, 6.0], [7.0, 8.0]]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
y = fluid.
layers.
data(name='y', shape=[2, 2, 2], dtype='float32')
y = fluid.data(name='y', shape=[2, 2, 2], dtype='float32')
fluid.layers.reduce_prod(y, dim=[1, 2]) # [24.0, 1680.0]
fluid.layers.reduce_prod(y, dim=[0, 1]) # [105.0, 384.0]
...
...
doc/fluid/api_cn/layers_cn/reduce_sum_cn.rst
浏览文件 @
f2364d84
...
...
@@ -26,7 +26,7 @@ reduce_sum
# [[0.2, 0.3, 0.5, 0.9]
# [0.1, 0.2, 0.6, 0.7]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
x = fluid.
layers.
data(name='x', shape=[2, 4], dtype='float32')
x = fluid.data(name='x', shape=[2, 4], dtype='float32')
fluid.layers.reduce_sum(x) # [3.5]
fluid.layers.reduce_sum(x, dim=0) # [0.3, 0.5, 1.1, 1.6]
fluid.layers.reduce_sum(x, dim=-1) # [1.9, 1.6]
...
...
@@ -36,7 +36,7 @@ reduce_sum
# [[[1, 2], [3, 4]],
# [[5, 6], [7, 8]]]
# 接下来的示例中,我们在每处函数调用后面都标注出了它的结果张量。
y = fluid.
layers.
data(name='y', shape=[2, 2, 2], dtype='float32')
y = fluid.data(name='y', shape=[2, 2, 2], dtype='float32')
fluid.layers.reduce_sum(y, dim=[1, 2]) # [10, 26]
fluid.layers.reduce_sum(y, dim=[0, 1]) # [16, 20]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录