diff --git a/mindspore/nn/layer/basic.py b/mindspore/nn/layer/basic.py index 1c85b3843a3..49c9ff998ed 100644 --- a/mindspore/nn/layer/basic.py +++ b/mindspore/nn/layer/basic.py @@ -1222,6 +1222,7 @@ class MatrixDiag(Cell): [[[ 1. 0. 0.] [ 0. -1. 0.] [ 0. 0. 1.] + [[ 1. 0. 0.] [ 0. -1. 0.] [ 0. 0. 1.]]] diff --git a/mindspore/ops/composite/random_ops.py b/mindspore/ops/composite/random_ops.py index f3edf17e973..d437a7f2c6c 100644 --- a/mindspore/ops/composite/random_ops.py +++ b/mindspore/ops/composite/random_ops.py @@ -253,8 +253,10 @@ def gamma(shape, alpha, beta, seed=None): >>> print(output) [[[ 2.2132034 5.8855834]] [ 3.3981476 7.5805717] + [[ 3.3981476 7.5805717]] [ 3.7190282 19.941492] + [[ 2.9512358 2.5969937]] [ 3.786061 5.160872 ]]] >>> # case 4: beta_shape is (2, 1), the output is different. @@ -266,8 +268,10 @@ def gamma(shape, alpha, beta, seed=None): >>> print(output) [[[ 5.6085486 7.8280783]] [ 15.97684 16.116285] + [[ 1.8347423 1.713663]] [ 3.2434065 15.667398] + [[ 4.2922077 7.3365674]] [ 5.3876944 13.159832 ]]] """