Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
35ef4180
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
35ef4180
编写于
8月 16, 2021
作者:
L
Li Min
提交者:
GitHub
8月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typos in English docs for diag and diagflat. (#34869)
* Fix typos in english docs for diag and diagflat.
上级
b1cc4a46
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
5 deletion
+7
-5
paddle/fluid/operators/diag_v2_op.cc
paddle/fluid/operators/diag_v2_op.cc
+1
-1
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+4
-2
python/paddle/tensor/creation.py
python/paddle/tensor/creation.py
+2
-2
未找到文件。
paddle/fluid/operators/diag_v2_op.cc
浏览文件 @
35ef4180
...
@@ -79,7 +79,7 @@ class DiagV2OpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -79,7 +79,7 @@ class DiagV2OpMaker : public framework::OpProtoAndCheckerMaker {
"Tensor. The default value is 0."
)
"Tensor. The default value is 0."
)
.
SetDefault
(
0.0
f
);
.
SetDefault
(
0.0
f
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
h
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
i
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a matrix (2-D tensor), a 1-D tensor with the diagonal elements of ``x`` is returned.
If ``x`` is a matrix (2-D tensor), a 1-D tensor with the diagonal elements of ``x`` is returned.
...
...
python/paddle/fluid/layers/nn.py
浏览文件 @
35ef4180
...
@@ -13342,7 +13342,7 @@ def shuffle_channel(x, group, name=None):
...
@@ -13342,7 +13342,7 @@ def shuffle_channel(x, group, name=None):
[[0.7, 0.8],
[[0.7, 0.8],
[0.8, 0.9]]]]
[0.8, 0.9]]]]
Given group: 2
Given group: 2
then we get a 4-D tensor out w
h
th the same shape of input:
then we get a 4-D tensor out w
i
th the same shape of input:
out.shape = (1, 4, 2, 2)
out.shape = (1, 4, 2, 2)
out.data = [[[[0.1, 0.2],
out.data = [[[[0.1, 0.2],
[0.2, 0.3]],
[0.2, 0.3]],
...
@@ -13370,7 +13370,9 @@ def shuffle_channel(x, group, name=None):
...
@@ -13370,7 +13370,9 @@ def shuffle_channel(x, group, name=None):
Examples:
Examples:
.. code-block:: python
.. code-block:: python
import paddle.fluid as fluid
import paddle
import paddle.fluid as fluid
paddle.enable_static()
input = fluid.data(name='input', shape=[None,4,2,2], dtype='float32')
input = fluid.data(name='input', shape=[None,4,2,2], dtype='float32')
out = fluid.layers.shuffle_channel(x=input, group=2)
out = fluid.layers.shuffle_channel(x=input, group=2)
"""
"""
...
...
python/paddle/tensor/creation.py
浏览文件 @
35ef4180
...
@@ -777,7 +777,7 @@ def meshgrid(*args, **kwargs):
...
@@ -777,7 +777,7 @@ def meshgrid(*args, **kwargs):
def
diagflat
(
x
,
offset
=
0
,
name
=
None
):
def
diagflat
(
x
,
offset
=
0
,
name
=
None
):
"""
"""
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
h
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
i
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a tensor (more than 1-D), a 2-D square tensor with the elements of flattened ``x`` as the diagonal is returned.
If ``x`` is a tensor (more than 1-D), a 2-D square tensor with the elements of flattened ``x`` as the diagonal is returned.
...
@@ -902,7 +902,7 @@ def diagflat(x, offset=0, name=None):
...
@@ -902,7 +902,7 @@ def diagflat(x, offset=0, name=None):
def
diag
(
x
,
offset
=
0
,
padding_value
=
0
,
name
=
None
):
def
diag
(
x
,
offset
=
0
,
padding_value
=
0
,
name
=
None
):
"""
"""
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
h
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a vector (1-D tensor), a 2-D square tensor w
i
th the elements of ``x`` as the diagonal is returned.
If ``x`` is a matrix (2-D tensor), a 1-D tensor with the diagonal elements of ``x`` is returned.
If ``x`` is a matrix (2-D tensor), a 1-D tensor with the diagonal elements of ``x`` is returned.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录