提交 de657141 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2328 fix range

Merge pull request !2328 from jiangjinsheng/issue_fix4
......@@ -15,6 +15,7 @@
"""math"""
import math
from mindspore.ops import operations as P
from mindspore.ops.operations import _inner_ops as inner
from mindspore.common.tensor import Tensor
from ..cell import Cell
from ...common import dtype as mstype
......@@ -114,7 +115,7 @@ class Range(Cell):
limit = float(limit)
if isinstance(delta, int):
delta = float(delta)
self.range_x = P.Range(start, limit, delta)
self.range_x = inner.Range(start, limit, delta)
if limit is None:
length_input = math.ceil(start / delta)
else:
......
......@@ -372,7 +372,7 @@ class GlobalBatchNorm(_BatchNorm):
Args:
num_features (int): `C` from an expected input of size (N, C, H, W).
device_num_each_group (int): The number of devices in each group.
device_num_each_group (int): The number of devices in each group. Default: 1.
eps (float): A value added to the denominator for numerical stability. Default: 1e-5.
momentum (float): A floating hyperparameter of the momentum for the
running_mean and running_var computation. Default: 0.9.
......
......@@ -122,8 +122,8 @@ class SameTypeShape(PrimitiveWithInfer):
Checks whether data type and shape of two tensors are the same.
Raises:
TypeError - If data type not the same.
ValueError - If shape of two tensors not the same.
TypeError: If data type not the same.
ValueError: If shape of two tensors not the same.
Inputs:
- **input_x** (Tensor) - The shape of tensor is :math:`(x_1, x_2, ..., x_R)`.
......
......@@ -673,7 +673,7 @@ class BatchNorm(PrimitiveWithInfer):
>>> mean = Tensor(np.ones([64]), mindspore.float32)
>>> variance = Tensor(np.ones([64]), mindspore.float32)
>>> batch_norm = P.BatchNorm()
>>> output = batch_norm(input_x, scale, bias, mean, variance
>>> output = batch_norm(input_x, scale, bias, mean, variance)
"""
@prim_attr_register
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册