Browse Source

!8889 update example of some operations.

From: @wangshuide2020
Reviewed-by: @liangchenghui,@youui
Signed-off-by: @liangchenghui
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
f68446c284
3 changed files with 2 additions and 5 deletions
  1. +0
    -1
      mindspore/nn/layer/embedding.py
  2. +0
    -4
      mindspore/nn/layer/normalization.py
  3. +2
    -0
      mindspore/nn/metrics/fbeta.py

+ 0
- 1
mindspore/nn/layer/embedding.py View File

@@ -172,7 +172,6 @@ class EmbeddingLookup(Cell):
>>> print(result)
[[[ 0.00856617 0.01039034]
[ 0.00196276 -0.00094072]]

[[ 0.01279703 0.00078912]
[ 0.00084863 -0.00742412]]]
"""


+ 0
- 4
mindspore/nn/layer/normalization.py View File

@@ -383,10 +383,8 @@ class BatchNorm2d(_BatchNorm):
>>> print(output)
[[[[171.99915 46.999763 ]
[116.99941 191.99904 ]]

[[ 66.999664 250.99875 ]
[194.99902 102.99948 ]]

[[ 8.999955 210.99895 ]
[ 20.999895 241.9988 ]]]]
"""
@@ -490,10 +488,8 @@ class GlobalBatchNorm(_BatchNorm):
>>> print(output)
[[[[171.99915 46.999763]
[116.99941 191.99904 ]]

[[ 66.999664 250.99875 ]
[194.99902 102.99948 ]]

[[ 8.999955 210.99895 ]
[ 20.9999895 241.9988 ]]]]
"""


+ 2
- 0
mindspore/nn/metrics/fbeta.py View File

@@ -38,6 +38,8 @@ class Fbeta(Metric):
>>> metric = nn.Fbeta(1)
>>> metric.update(x, y)
>>> fbeta = metric.eval()
>>> print(fbeta)
[0.66666667 0.66666667]
"""
def __init__(self, beta):
super(Fbeta, self).__init__()


Loading…
Cancel
Save