From 41b79ac14cbdbc64cc94bb8788e2ab20d82876e5 Mon Sep 17 00:00:00 2001 From: lilinjie Date: Fri, 8 Apr 2022 17:11:52 +0800 Subject: [PATCH] more understandable op explanations for 1.7 --- .../python/mindspore/ops/operations/math_ops.py | 2 +- mindspore/python/mindspore/ops/operations/nn_ops.py | 3 +-- .../python/mindspore/ops/operations/other_ops.py | 13 ++++++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mindspore/python/mindspore/ops/operations/math_ops.py b/mindspore/python/mindspore/ops/operations/math_ops.py index 10240bb144b..cb2ebd59cc6 100644 --- a/mindspore/python/mindspore/ops/operations/math_ops.py +++ b/mindspore/python/mindspore/ops/operations/math_ops.py @@ -5401,7 +5401,7 @@ class Invert(Primitive): .. math:: - out_i = -x_{i} + out_i = ~x_{i} Inputs: - **x** (Tensor) - The shape of tensor is :math:`(x_1, x_2, ..., x_R)`. diff --git a/mindspore/python/mindspore/ops/operations/nn_ops.py b/mindspore/python/mindspore/ops/operations/nn_ops.py index 79397bd7260..d6a7022f803 100644 --- a/mindspore/python/mindspore/ops/operations/nn_ops.py +++ b/mindspore/python/mindspore/ops/operations/nn_ops.py @@ -6666,8 +6666,7 @@ class Dropout(PrimitiveWithCheck): Seed1 (int): Seed1 value for random generating. Default: 0. Inputs: - - **x** (Tensor) - Tensor of shape :math:`(N, *)`, where :math:`*` means, any number of - additional dimensions, with float16 or float32 data type. + - **x** (Tensor) - The input of Dropout, a Tensor of any shape with data type of float16 or float32. Outputs: - **output** (Tensor) - With the same shape and data type as `x`. diff --git a/mindspore/python/mindspore/ops/operations/other_ops.py b/mindspore/python/mindspore/ops/operations/other_ops.py index 53b66a93495..60ff20a270d 100644 --- a/mindspore/python/mindspore/ops/operations/other_ops.py +++ b/mindspore/python/mindspore/ops/operations/other_ops.py @@ -222,12 +222,14 @@ class CheckValid(PrimitiveWithInfer): specifying the valid boundary (heights x ratio, weights x ratio). Inputs: - - **bboxes** (Tensor) - Bounding boxes tensor with shape (N, 4). Data type must be float16 or float32. - - **img_metas** (Tensor) - Raw image size information with the format of (height, width, ratio). - Data type must be float16 or float32. + - **bboxes** (Tensor) - Bounding boxes tensor with shape (N, 4). "N" indicates the number of + bounding boxes, the value "4" indicates "x0", "x1", "y0", and "y1". Data type must be float16 or float32. + - **img_metas** (Tensor) - Raw image size information with the format of (height, width, ratio), specifying + the valid boundary(height * ratio, width * ratio). Data type must be float16 or float32. Outputs: - Tensor, with shape of (N,) and dtype of bool. + Tensor, with shape of (N,) and dtype of bool, specifying whether the bounding boxes is in the image. + "True" indicates valid, while "False" indicates invalid. Raises: TypeError: If `bboxes` or `img_metas` is not a Tensor. @@ -609,7 +611,8 @@ class ConfusionMatrix(PrimitiveWithInfer): class PopulationCount(PrimitiveWithInfer): r""" - Calculates population count. + Computes element-wise population count(a.k.a bitsum, bitcount). + For each entry in `input` , calculates the number of 1 bits in the binary representation of that entry. Inputs: - **input** (Tensor) - The data type must be int16 or uint16.