hide arange, delete related test case and improve the doc string of nn.Range

pull/9798/head
Bairong 4 years ago
parent 60f7a62815
commit 8cf43e59e0

@ -99,7 +99,7 @@ class ReduceLogSumExp(Cell):
class Range(Cell): class Range(Cell):
r""" r"""
Creates a sequence of numbers. Creates a sequence of numbers in range [start, limit) with step size delta.
Args: Args:
start (Union[int, float]): If `limit` is `None`, the value acts as limit in the range and first entry start (Union[int, float]): If `limit` is `None`, the value acts as limit in the range and first entry

@ -23,11 +23,6 @@ from . import operations as P
from .operations import _grad_ops from .operations import _grad_ops
def arange(start, limit=None, delta=1):
from mindspore.nn import Range
return Range(start, limit, delta)()
typeof = Primitive('typeof') typeof = Primitive('typeof')
hastype = Primitive('hastype') hastype = Primitive('hastype')
cast = P.Cast() cast = P.Cast()

@ -24,7 +24,6 @@ from mindspore import Tensor
from mindspore.common import dtype as mstype from mindspore.common import dtype as mstype
from mindspore.ops import composite as C from mindspore.ops import composite as C
from mindspore.ops import operations as P from mindspore.ops import operations as P
from mindspore.ops import functional as F
from mindspore.ops import prim_attr_register, PrimitiveWithInfer from mindspore.ops import prim_attr_register, PrimitiveWithInfer
from ..ut_filter import non_graph_engine from ..ut_filter import non_graph_engine
from ....mindspore_test_framework.mindspore_test import mindspore_test from ....mindspore_test_framework.mindspore_test import mindspore_test
@ -140,13 +139,6 @@ def test_eye():
assert np.all(eye_output.asnumpy() == expect) assert np.all(eye_output.asnumpy() == expect)
def test_arange():
""" test_arange """
F.arange(10)
F.arange(1, 5)
F.arange(1, 10, 2)
class VirtualLossGrad(PrimitiveWithInfer): class VirtualLossGrad(PrimitiveWithInfer):
""" VirtualLossGrad definition """ """ VirtualLossGrad definition """

Loading…
Cancel
Save