Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
5720fedf
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看板
提交
5720fedf
编写于
9月 28, 2020
作者:
F
ForFishes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
replace rank with ndim
上级
94206405
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+1
-1
python/paddle/tensor/manipulation.py
python/paddle/tensor/manipulation.py
+4
-4
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
5720fedf
...
...
@@ -8589,7 +8589,7 @@ def scatter_nd(index, updates, shape, name=None):
seen :code:`scatter_nd_add` . This op is the inverse of the :code:`gather_nd` op.
Args:
index (Tensor): The index input with
rank
> 1 and index.shape[-1] <= len(shape).
index (Tensor): The index input with
ndim
> 1 and index.shape[-1] <= len(shape).
Its dtype should be int32 or int64 as it is used as indexes.
updates (Tensor): The updated value of scatter_nd op. Its dtype should be float32, float64.
It must have the shape index.shape[:-1] + shape[index.shape[-1]:]
...
...
python/paddle/tensor/manipulation.py
浏览文件 @
5720fedf
...
...
@@ -980,10 +980,10 @@ def scatter_nd_add(x, index, updates, name=None):
Output is obtained by applying sparse addition to a single value
or slice in a Tensor.
:attr:`x` is a Tensor with
rank
:math:`R`
and :attr:`index` is a Tensor with
rank
:math:`K` . Thus, :attr:`index`
:attr:`x` is a Tensor with
ndim
:math:`R`
and :attr:`index` is a Tensor with
ndim
:math:`K` . Thus, :attr:`index`
has shape :math:`[i_0, i_1, ..., i_{K-2}, Q]` where :math:`Q \leq R` . :attr:`updates`
is a Tensor with
rank
:math:`K - 1 + R - Q` and its
is a Tensor with
ndim
:math:`K - 1 + R - Q` and its
shape is :math:`index.shape[:-1] + x.shape[index.shape[-1]:]` .
According to the :math:`[i_0, i_1, ..., i_{K-2}]` of :attr:`index` ,
...
...
@@ -1018,7 +1018,7 @@ def scatter_nd_add(x, index, updates, name=None):
Args:
x (Tensor): The x input. Its dtype should be float32, float64.
index (Tensor): The index input with
rank > 1 and index.shape[-1] <= x.rank
.
index (Tensor): The index input with
ndim > 1 and index.shape[-1] <= x.ndim
.
Its dtype should be int32 or int64 as it is used as indexes.
updates (Tensor): The updated value of scatter_nd_add op, and it must have the same dtype
as x. It must have the shape index.shape[:-1] + x.shape[index.shape[-1]:].
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录