diff --git a/.jenkins/OWNERS b/.jenkins/OWNERS index 745ee57739c..060b42c5c1e 100644 --- a/.jenkins/OWNERS +++ b/.jenkins/OWNERS @@ -17,7 +17,6 @@ approvers: - john_tzanakakis - jpc_chenjianping - kingxian -- leonwanghui - liangchenghui - lilongfei15 - limingqi107 diff --git a/OWNERS b/OWNERS index 9d40c249f76..85baeecd051 100644 --- a/OWNERS +++ b/OWNERS @@ -3,7 +3,6 @@ approvers: - guoqi1024 - baochong - zhaizhiqiang -- leonwanghui files: "akg": diff --git a/docs/api_img/ScatterNd.png b/docs/api_img/ScatterNd.png new file mode 100644 index 00000000000..fcd98f1e508 Binary files /dev/null and b/docs/api_img/ScatterNd.png differ diff --git a/mindspore/nn/layer/activation.py b/mindspore/nn/layer/activation.py index ead70feaae2..0cf9f2389bd 100644 --- a/mindspore/nn/layer/activation.py +++ b/mindspore/nn/layer/activation.py @@ -734,7 +734,7 @@ class LogSigmoid(Cell): TypeError: If dtype of `x` is neither float16 nor float32. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> net = nn.LogSigmoid() diff --git a/mindspore/nn/layer/combined.py b/mindspore/nn/layer/combined.py index 72c9bcab299..a094900e2fd 100644 --- a/mindspore/nn/layer/combined.py +++ b/mindspore/nn/layer/combined.py @@ -187,7 +187,7 @@ class DenseBnAct(Cell): ValueError: If `momentum` is not in range [0, 1.0]. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> net = nn.DenseBnAct(3, 4) diff --git a/mindspore/nn/layer/conv.py b/mindspore/nn/layer/conv.py index 4fc2af16daa..642b57dd334 100644 --- a/mindspore/nn/layer/conv.py +++ b/mindspore/nn/layer/conv.py @@ -737,7 +737,7 @@ class Conv3dTranspose(_Conv): Tensor, the shape is :math:`(N, C_{out}, D_{out}, H_{out}, W_{out})`. Supported Platforms: - ``Ascend`` + ``Ascend`` ``GPU`` Raises: TypeError: If `in_channels`, `out_channels` or `group` is not an int. diff --git a/mindspore/nn/loss/loss.py b/mindspore/nn/loss/loss.py index 5ba76bf5dae..bc13d5e560b 100644 --- a/mindspore/nn/loss/loss.py +++ b/mindspore/nn/loss/loss.py @@ -699,7 +699,7 @@ class MultiClassDiceLoss(LossBase): ValueError: If `weights` is a tensor, but its dimension is not 2. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> loss = nn.MultiClassDiceLoss(weights=None, ignore_indiex=None, activation="softmax") @@ -1095,7 +1095,7 @@ class CosineEmbeddingLoss(LossBase): ValueError: If `margin` is not in range [-1, 1]. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> logits_x1 = Tensor(np.array([[0.3, 0.8], [0.4, 0.3]]), mindspore.float32) diff --git a/mindspore/nn/optim/ftrl.py b/mindspore/nn/optim/ftrl.py index 61c472893b4..c531364f677 100644 --- a/mindspore/nn/optim/ftrl.py +++ b/mindspore/nn/optim/ftrl.py @@ -170,7 +170,7 @@ class FTRL(Optimizer): ValueError: If `initial_accum`, `l1` or `l2` is less than 0. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> net = Net() diff --git a/mindspore/nn/optim/lamb.py b/mindspore/nn/optim/lamb.py index c52e917d50b..1e63a75ed42 100755 --- a/mindspore/nn/optim/lamb.py +++ b/mindspore/nn/optim/lamb.py @@ -241,7 +241,7 @@ class Lamb(Optimizer): ValueError: If `weight_decay` is less than 0. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> net = Net() diff --git a/mindspore/ops/operations/array_ops.py b/mindspore/ops/operations/array_ops.py index 40b7f2582e6..a80c7d828e2 100755 --- a/mindspore/ops/operations/array_ops.py +++ b/mindspore/ops/operations/array_ops.py @@ -3475,6 +3475,11 @@ class ScatterNd(PrimitiveWithInfer): `updates` is a tensor of rank `Q-1+P-N`. Its shape is: :math:`(i_0, i_1, ..., i_{Q-2}, shape_N, ..., shape_{P-1})`. + The following figure shows the calculation process of inserting two slices in the first dimension of a rank-3 + with two matrices of new values: + + .. image:: api_img/ScatterNd.png + Inputs: - **indices** (Tensor) - The index of scattering in the new tensor with int32 or int64 data type. The rank of indices must be at least 2 and `indices_shape[-1] <= len(shape)`. @@ -3498,6 +3503,30 @@ class ScatterNd(PrimitiveWithInfer): Examples: >>> op = ops.ScatterNd() + >>> indices = Tensor(np.array([[0], [2]]), mindspore.int32) + >>> updates = Tensor(np.array([[[1, 1, 1, 1], [2, 2, 2, 2], + ... [3, 3, 3, 3], [4, 4, 4, 4]], + ... [[1, 1, 1, 1], [2, 2, 2, 2], + ... [3, 3, 3, 3], [4, 4, 4, 4]]]), mindspore.float32) + >>> shape = (4, 4, 4) + >>> output = op(indices, updates, shape) + >>> print(output) + [[[1. 1. 1. 1.] + [2. 2. 2. 2.] + [3. 3. 3. 3.] + [4. 4. 4. 4.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]] + [[1. 1. 1. 1.] + [2. 2. 2. 2.] + [3. 3. 3. 3.] + [4. 4. 4. 4.]] + [[0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.] + [0. 0. 0. 0.]]] >>> indices = Tensor(np.array([[0, 1], [1, 1]]), mindspore.int32) >>> updates = Tensor(np.array([3.2, 1.1]), mindspore.float32) >>> shape = (3, 3) @@ -5690,7 +5719,7 @@ class Sort(PrimitiveWithInfer): TypeError: If dtype of `x` is neither float16 nor float32. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> x = Tensor(np.array([[8, 2, 1], [5, 9, 3], [4, 6, 7]]), mindspore.float16) diff --git a/mindspore/ops/operations/nn_ops.py b/mindspore/ops/operations/nn_ops.py index 00b57a1d3ae..d19d2b80aeb 100755 --- a/mindspore/ops/operations/nn_ops.py +++ b/mindspore/ops/operations/nn_ops.py @@ -8243,7 +8243,7 @@ class Conv3D(PrimitiveWithInfer): ValueError: If `data_format` is not 'NCDHW'. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> x = Tensor(np.ones([16, 3, 10, 32, 32]), mindspore.float16) diff --git a/mindspore/ops/operations/random_ops.py b/mindspore/ops/operations/random_ops.py index 16dd14c36ec..6fd90a7917e 100644 --- a/mindspore/ops/operations/random_ops.py +++ b/mindspore/ops/operations/random_ops.py @@ -301,7 +301,7 @@ class UniformInt(PrimitiveWithInfer): Tensor. The shape is the same as the input 'shape', and the data type is int32. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> shape = (2, 4) @@ -362,7 +362,7 @@ class UniformReal(StandardNormal): ValueError: If `shape` is not a constant value. Supported Platforms: - ``Ascend`` ``GPU`` + ``Ascend`` ``GPU`` ``CPU`` Examples: >>> shape = (2, 2) diff --git a/tests/OWNERS b/tests/OWNERS index a03a419fa34..f87ea3ceba5 100644 --- a/tests/OWNERS +++ b/tests/OWNERS @@ -17,7 +17,6 @@ approvers: - john_tzanakakis - jpc_chenjianping - kingxian -- leonwanghui - liangchenghui - lilongfei15 - limingqi107