!14535 Modify the results in the dicelos example and the example of occlusion sensitivity

From: @lijiaqi0612
Reviewed-by: @kingxian,@zh_qh
Signed-off-by: @kingxian
pull/14535/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 479ffdfcbd

@ -436,7 +436,7 @@ class DiceLoss(_Loss):
>>> y = Tensor(np.array([[0, 1], [1, 0], [0, 1]]), mstype.float32)
>>> output = loss(y_pred, y)
>>> print(output)
[0.38596618]
0.38596618
"""
def __init__(self, smooth=1e-5):
super(DiceLoss, self).__init__()

@ -52,7 +52,7 @@ class OcclusionSensitivity(Metric):
Example:
>>> class DenseNet(nn.Cell):
... def __init__(self):
... super(DenseNet, self).init()
... super(DenseNet, self).__init__()
... w = np.array([[0.1, 0.8, 0.1, 0.1],[1, 1, 1, 1]]).astype(np.float32)
... b = np.array([0.3, 0.6]).astype(np.float32)
... self.dense = nn.Dense(4, 2, weight_init=Tensor(w), bias_init=Tensor(b))

Loading…
Cancel
Save