Browse Source

!9798 hide arange

From: @bairongz
Reviewed-by: @zh_qh,@zhunaipan
Signed-off-by: @zh_qh
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
10d326ee62
3 changed files with 1 additions and 14 deletions
  1. +1
    -1
      mindspore/nn/layer/math.py
  2. +0
    -5
      mindspore/ops/functional.py
  3. +0
    -8
      tests/ut/python/ops/test_math_ops.py

+ 1
- 1
mindspore/nn/layer/math.py View File

@@ -99,7 +99,7 @@ class ReduceLogSumExp(Cell):

class Range(Cell):
r"""
Creates a sequence of numbers.
Creates a sequence of numbers in range [start, limit) with step size delta.

Args:
start (Union[int, float]): If `limit` is `None`, the value acts as limit in the range and first entry


+ 0
- 5
mindspore/ops/functional.py View File

@@ -23,11 +23,6 @@ from . import operations as P
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')
hastype = Primitive('hastype')
cast = P.Cast()


+ 0
- 8
tests/ut/python/ops/test_math_ops.py View File

@@ -24,7 +24,6 @@ from mindspore import Tensor
from mindspore.common import dtype as mstype
from mindspore.ops import composite as C
from mindspore.ops import operations as P
from mindspore.ops import functional as F
from mindspore.ops import prim_attr_register, PrimitiveWithInfer
from ..ut_filter import non_graph_engine
from ....mindspore_test_framework.mindspore_test import mindspore_test
@@ -140,13 +139,6 @@ def test_eye():
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):
""" VirtualLossGrad definition """



Loading…
Cancel
Save