fix python lint of hypercomplex
This commit is contained in:
parent
b4052c054f
commit
691e7ad0e0
|
@ -13,7 +13,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
"""Complex Operators"""
|
"""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 Conv1d, Conv2d, Conv3d
|
||||||
from mindspore.hypercomplex.complex.complex_operators import BatchNorm1d, BatchNorm2d, BatchNorm3d
|
from mindspore.hypercomplex.complex.complex_operators import BatchNorm1d, BatchNorm2d, BatchNorm3d
|
||||||
from mindspore.hypercomplex.complex.complex_operators import Dense
|
from mindspore.hypercomplex.complex.complex_operators import Dense
|
||||||
|
|
|
@ -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.hypercomplex.hc_dense import Dense as HDense
|
||||||
from mindspore.hypercomplex.complex._complex_dense_impl import _DenseImpl as DenseImpl, \
|
from mindspore.hypercomplex.complex._complex_dense_impl import _DenseImpl as DenseImpl, \
|
||||||
_KaratsubaDenseImpl as KaratsubaDenseImpl
|
_KaratsubaDenseImpl as KaratsubaDenseImpl
|
||||||
# ReLU
|
|
||||||
from mindspore.hypercomplex.hypercomplex.uniform_operator import _UniformOperator
|
from mindspore.hypercomplex.hypercomplex.uniform_operator import _UniformOperator
|
||||||
|
|
||||||
from mindspore.hypercomplex.utils import _size_1_t, _size_2_t, _size_3_t
|
from mindspore.hypercomplex.utils import _size_1_t, _size_2_t, _size_3_t
|
||||||
|
|
|
@ -31,6 +31,7 @@ def get_x_and_y(tensor):
|
||||||
|
|
||||||
|
|
||||||
def to_2channel(real, imag, dtype=None):
|
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:
|
if dtype is not None and dtype == mindspore.complex64:
|
||||||
return to_complex(real, imag)
|
return to_complex(real, imag)
|
||||||
if dtype is not None and (dtype != real.dtype or dtype != imag.dtype):
|
if dtype is not None and (dtype != real.dtype or dtype != imag.dtype):
|
||||||
|
|
Loading…
Reference in New Issue