diff --git a/mindspore/common/__init__.py b/mindspore/common/__init__.py index c60c79ccf58..39afd6410b3 100644 --- a/mindspore/common/__init__.py +++ b/mindspore/common/__init__.py @@ -14,7 +14,6 @@ # ============================================================================ """Top-level reference to dtype of common module.""" from . import dtype -from . import monad from .api import ms_function from .dtype import * from .parameter import Parameter, ParameterTuple @@ -28,6 +27,5 @@ __all__.extend([ 'ms_function', # api 'Parameter', 'ParameterTuple', # parameter "dtype", - 'monad', "set_seed", "get_seed" # random seed ]) diff --git a/mindspore/common/monad.py b/mindspore/common/_monad.py similarity index 100% rename from mindspore/common/monad.py rename to mindspore/common/_monad.py diff --git a/mindspore/ops/operations/other_ops.py b/mindspore/ops/operations/other_ops.py index 843d3754623..a5aa95bf458 100644 --- a/mindspore/ops/operations/other_ops.py +++ b/mindspore/ops/operations/other_ops.py @@ -15,8 +15,8 @@ """Other operators.""" import functools +import mindspore.common._monad as monad from mindspore import log as logger -from mindspore.common import monad from mindspore.common._decorator import deprecated from .. import signature as sig from ..._checkparam import Validator as validator, Rel diff --git a/tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py b/tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py index 6e6a0294bc3..e526afa29ab 100644 --- a/tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py +++ b/tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py @@ -13,7 +13,7 @@ # limitations under the License. # ============================================================================ import mindspore.common.dtype as mstype -from mindspore.common import monad +import mindspore.common._monad as monad from mindspore.common.tensor import Tensor from mindspore.ops import Primitive from mindspore.ops import operations as P diff --git a/tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py b/tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py index ee64fa93eba..861268ed433 100644 --- a/tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py +++ b/tests/ut/cpp/python_input/gtest_input/pre_activate/momentum_lossscale_fusion_test.py @@ -13,7 +13,7 @@ # limitations under the License. # ============================================================================ import mindspore.common.dtype as mstype -from mindspore.common import monad +import mindspore.common._monad as monad from mindspore.common.tensor import Tensor from mindspore.ops import Primitive from mindspore.ops import operations as P