已合并
fix: 补充sparse_bincount算子indices和values取值范围约束 #4161
xuejinghui创建于 7月21日
fix: 补充sparse_bincount算子indices和values取值范围约束 #4161
已合并
xuejinghui创建于 7月21日
已删除 :README合入到cann/ops-mathmaster
1 个文件变更+2-2
Mmath/sparse_bincount/README.md+2-2
@@ -99,12 +99,12 @@ $$
99- indices 为 2D tensor,shape (N, R);values、dense_shape、size、weights 均为 1D tensor99- indices 为 2D tensor,shape (N, R);values、dense_shape、size、weights 均为 1D tensor
100- indices 行数(N) 必须等于 values 元素数(N)100- indices 行数(N) 必须等于 values 元素数(N)
101- indices 列数(R) 必须等于 dense_shape 元素数(R)101- indices 列数(R) 必须等于 dense_shape 元素数(R)
102+- indices[:, j] 必须在 [0, dense_shape[j]) 范围内
103+- values[i] 必须在 [0, size) 范围内
102- weights 非空时,元素数必须与 values 元素数(N) 相等104- weights 非空时,元素数必须与 values 元素数(N) 相等
103- size 为非负标量105- size 为非负标量
104-- values[i] < 0 或 values[i] >= size 时跳过,不写入输出
105- weights 为空(元素数为0)时,每个出现计为 1.0106- weights 为空(元素数为0)时,每个出现计为 1.0
106- binary_output = True 时,出现过的 bin 设为 1.0,忽略权重107- binary_output = True 时,出现过的 bin 设为 1.0,忽略权重
107-- 多维场景 batch < 0 或 batch >= dense_shape[0] 时跳过
108 108 
109## 调用说明109## 调用说明
110 110