forked from mindspore-Ecosystem/mindspore
!48098 fix example docs master
Merge pull request !48098 from 冯一航/code_docs_modify_example_docs_master
This commit is contained in:
commit
03e968dfb9
|
@ -615,7 +615,7 @@ def positive(x):
|
|||
>>> from mindspore import dtype as mstype
|
||||
>>> x = Tensor(np.array([-5.0, 1.5, 3.0, 100.0]), mstype.float32)
|
||||
>>> print(ops.positive(x))
|
||||
[-5.0, 1.5, 3.0, 100.0]
|
||||
[ -5. 1.5 3. 100. ]
|
||||
"""
|
||||
if not isinstance(x, (Tensor, Tensor_)):
|
||||
raise TypeError(f"For positive, the input must be a Tensor, but got {type(x)}")
|
||||
|
|
|
@ -3900,6 +3900,7 @@ def gaussian_nll_loss(x, target, var, full=False, eps=1e-6, reduction='mean'):
|
|||
>>> target = Tensor(arr2, mstype.float32)
|
||||
>>> output = ops.gaussian_nll_loss(x, target, var)
|
||||
>>> print(output)
|
||||
1.4374993
|
||||
|
||||
Reference:
|
||||
Nix, D. A. and Weigend, A. S., "Estimating the mean and variance of the
|
||||
|
|
Loading…
Reference in New Issue