diff --git a/mindspore/nn/layer/activation.py b/mindspore/nn/layer/activation.py index 9d949812bde..93ef8cdbbd2 100644 --- a/mindspore/nn/layer/activation.py +++ b/mindspore/nn/layer/activation.py @@ -750,6 +750,8 @@ def get_activation(name): Examples: >>> sigmoid = nn.get_activation('sigmoid') + >>> print(sigmoid) + Sigmoid<> """ if name is None: return None diff --git a/mindspore/numpy/array_ops.py b/mindspore/numpy/array_ops.py index 2d3aa08f8eb..56e7d702759 100644 --- a/mindspore/numpy/array_ops.py +++ b/mindspore/numpy/array_ops.py @@ -2148,8 +2148,8 @@ def choose(a, choices, mode='clip'): Examples: >>> import mindspore.numpy as np - >>> choices = [[0, 1, 2, 3], [10, 11, 12, 13], - [20, 21, 22, 23], [30, 31, 32, 33]] + >>> choices = [[0, 1, 2, 3], [10, 11, 12, 13], + ... [20, 21, 22, 23], [30, 31, 32, 33]] >>> print(np.choose([2, 3, 1, 0], choices)) [20 31 12 3] >>> print(np.choose([2, 4, 1, 0], choices, mode='clip')) @@ -2160,8 +2160,8 @@ def choose(a, choices, mode='clip'): >>> choices = [-10, 10] >>> print(np.choose(a, choices)) [[ 10 -10 10] - [-10 10 -10] - [ 10 -10 10]] + [-10 10 -10] + [ 10 -10 10]] """ a = _to_tensor(a) if not _check_is_int(F.dtype(a)):