From 6fbb1e0e0e6119f2a3b70771f107590b06c4e76d Mon Sep 17 00:00:00 2001 From: xumengjuan1 Date: Wed, 6 Apr 2022 10:20:53 +0800 Subject: [PATCH] modify doc --- mindspore/python/mindspore/communication/_comm_helper.py | 5 +++-- .../python/mindspore/dataset/vision/py_transforms.py | 8 ++++---- .../python/mindspore/mindrecord/tools/tfrecord_to_mr.py | 2 +- mindspore/python/mindspore/ops/operations/random_ops.py | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mindspore/python/mindspore/communication/_comm_helper.py b/mindspore/python/mindspore/communication/_comm_helper.py index 9fe7d7428e2..05b3c51c083 100644 --- a/mindspore/python/mindspore/communication/_comm_helper.py +++ b/mindspore/python/mindspore/communication/_comm_helper.py @@ -97,8 +97,9 @@ DEFAULT_BACKEND = Backend("hccl") class GlobalComm: """ World communication information. The GlobalComm is a global class. The members contain: - BACKEND: The communication library used, using HCCL/NCCL. - WORLD_COMM_GROUP: Global communication domain. + + - BACKEND: The communication library used, using HCCL/NCCL. + - WORLD_COMM_GROUP: Global communication domain. """ BACKEND = DEFAULT_BACKEND WORLD_COMM_GROUP = HCCL_WORLD_COMM_GROUP diff --git a/mindspore/python/mindspore/dataset/vision/py_transforms.py b/mindspore/python/mindspore/dataset/vision/py_transforms.py index 578cd3b3c3b..f6a43bd7822 100644 --- a/mindspore/python/mindspore/dataset/vision/py_transforms.py +++ b/mindspore/python/mindspore/dataset/vision/py_transforms.py @@ -878,12 +878,12 @@ class RandomAffine(py_transforms.PyTensorOperation): shear (Union[float, Sequence[float, float], Sequence[float, float, float, float]], optional): Range of shear factor to select from. If float is provided, a shearing parallel to X axis with a factor selected from - (-`shear`, `shear`) will be applied. + (- `shear` , `shear` ) will be applied. If Sequence[float, float] is provided, a shearing parallel to X axis with a factor selected - from (`shear`[0], `shear`[1]) will be applied. + from ( `shear` [0], `shear` [1]) will be applied. If Sequence[float, float, float, float] is provided, a shearing parallel to X axis with a factor selected - from (`shear`[0], `shear`[1]) and a shearing parallel to Y axis with a factor selected from - (`shear`[2], `shear`[3]) will be applied. Default: None, means no shearing. + from ( `shear` [0], `shear` [1]) and a shearing parallel to Y axis with a factor selected from + ( `shear` [2], `shear` [3]) will be applied. Default: None, means no shearing. resample (Inter, optional): Method of interpolation. It can be Inter.BILINEAR, Inter.NEAREST or Inter.BICUBIC. If the input PIL Image is in mode of "1" or "P", Inter.NEAREST will be used directly. Default: Inter.NEAREST. diff --git a/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py b/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py index 6245bb26093..98f17b995cb 100644 --- a/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py +++ b/mindspore/python/mindspore/mindrecord/tools/tfrecord_to_mr.py @@ -75,7 +75,7 @@ class TFRecordToMR: source (str): TFRecord file to be transformed. destination (str): MindRecord file path to transform into, ensure that no file with the same name exists in the directory. - feature_dict (dict[str, `FixedLenFeature `_ ]): Dictionary + feature_dict (dict[str, `FixedLenFeature `_]): Dictionary that states the feature type, and `VarLenFeature `_ is not supported. bytes_fields (list[str], optional): The bytes fields which are in `feature_dict` and can be images bytes. diff --git a/mindspore/python/mindspore/ops/operations/random_ops.py b/mindspore/python/mindspore/ops/operations/random_ops.py index 3907ddf75b2..db3b68a3d8b 100644 --- a/mindspore/python/mindspore/ops/operations/random_ops.py +++ b/mindspore/python/mindspore/ops/operations/random_ops.py @@ -748,8 +748,8 @@ class LogUniformCandidateSampler(PrimitiveWithInfer): Outputs: Tuple of 3 Tensors. - - **sampled_candidates** (Tensor) - A Tensor with shape :math:`(num\_sampled,)` and - the same type as `true_classes`. + - **sampled_candidates** (Tensor) - A Tensor with shape :math:`(num\_sampled,)` + and the same type as `true_classes`. - **true_expected_count** (Tensor) - A Tensor with the same shape as `true_classes and` type float32. - **sampled_expected_count** (Tensor) - A Tensor with the same shape as `sampled_candidates` and type float32.