From 691e7ad0e0c5adc1eac68f3ce23b3043d6616aae Mon Sep 17 00:00:00 2001 From: chenhaozhe Date: Mon, 19 Jun 2023 13:50:50 +0300 Subject: [PATCH] fix python lint of hypercomplex --- mindspore/python/mindspore/hypercomplex/complex/__init__.py | 2 +- .../python/mindspore/hypercomplex/complex/complex_operators.py | 2 +- mindspore/python/mindspore/hypercomplex/utils.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mindspore/python/mindspore/hypercomplex/complex/__init__.py b/mindspore/python/mindspore/hypercomplex/complex/__init__.py index 99728704b35..21b673d19fd 100644 --- a/mindspore/python/mindspore/hypercomplex/complex/__init__.py +++ b/mindspore/python/mindspore/hypercomplex/complex/__init__.py @@ -13,7 +13,7 @@ # limitations under the License. # ============================================================================ """Complex Operators""" -from mindspore.hypercomplex.complex.complex_operators import ReLU +from mindspore.hypercomplex.complex.complex_relu import ReLU from mindspore.hypercomplex.complex.complex_operators import Conv1d, Conv2d, Conv3d from mindspore.hypercomplex.complex.complex_operators import BatchNorm1d, BatchNorm2d, BatchNorm3d from mindspore.hypercomplex.complex.complex_operators import Dense diff --git a/mindspore/python/mindspore/hypercomplex/complex/complex_operators.py b/mindspore/python/mindspore/hypercomplex/complex/complex_operators.py index d0f8c6bff9a..27e8701f675 100644 --- a/mindspore/python/mindspore/hypercomplex/complex/complex_operators.py +++ b/mindspore/python/mindspore/hypercomplex/complex/complex_operators.py @@ -30,7 +30,7 @@ from mindspore.hypercomplex.complex._complex_conv_impl import _ReImConvImpl as C from mindspore.hypercomplex.hypercomplex.hc_dense import Dense as HDense from mindspore.hypercomplex.complex._complex_dense_impl import _DenseImpl as DenseImpl, \ _KaratsubaDenseImpl as KaratsubaDenseImpl -# ReLU + from mindspore.hypercomplex.hypercomplex.uniform_operator import _UniformOperator from mindspore.hypercomplex.utils import _size_1_t, _size_2_t, _size_3_t diff --git a/mindspore/python/mindspore/hypercomplex/utils.py b/mindspore/python/mindspore/hypercomplex/utils.py index f4c6198e567..7432d37c002 100644 --- a/mindspore/python/mindspore/hypercomplex/utils.py +++ b/mindspore/python/mindspore/hypercomplex/utils.py @@ -31,6 +31,7 @@ def get_x_and_y(tensor): def to_2channel(real, imag, dtype=None): + """combine real and image data to a complex number""" if dtype is not None and dtype == mindspore.complex64: return to_complex(real, imag) if dtype is not None and (dtype != real.dtype or dtype != imag.dtype):