下面h1 h为mindspore.complex64类型,无法用ops.matmul处理。
希望能够提供可以运用复数矩阵运算的示例。
其实就这一个问题反反复复问了好几遍了,3天过去了。 ops.mm没法用,请不要推荐这个了。
ops.matmul(h1,h)
Traceback (most recent call last):
File "C:\Users\emcon\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-33-74476ad2996b>", line 1, in <module>
ops.matmul(h1,h)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\function\math_func.py", line 5172, in matmul
res = _batch_matmul(x1, x2)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\primitive.py", line 296, in __call__
return _run_op(self, self.name, args)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\common\api.py", line 98, in wrapper
results = fn(*arg, **kwargs)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\primitive.py", line 733, in _run_op
output = real_run_op(obj, op_name, args)
TypeError: For primitive[BatchMatMul], the input argument[w] must be a type of {Tensor[Float16], Tensor[Float32], Tensor[Float64], Tensor[Int16], Tensor[Int32], Tensor[Int64], Tensor[Int8]}, but got Tensor[Complex64].
----------------------------------------------------
- C++ Call Stack: (For framework developers)
下面h1 h为mindspore.complex64类型,无法用ops.matmul处理。
希望能够提供可以运用复数矩阵运算的示例。
其实就这一个问题反反复复问了好几遍了,3天过去了。 ops.mm没法用,请不要推荐这个了。
ops.matmul(h1,h)
Traceback (most recent call last):
File "C:\Users\emcon\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-33-74476ad2996b>", line 1, in <module>
ops.matmul(h1,h)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\function\math_func.py", line 5172, in matmul
res = _batch_matmul(x1, x2)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\primitive.py", line 296, in __call__
return _run_op(self, self.name, args)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\common\api.py", line 98, in wrapper
results = fn(*arg, **kwargs)
File "C:\Users\emcon\anaconda3\lib\site-packages\mindspore\ops\primitive.py", line 733, in _run_op
output = real_run_op(obj, op_name, args)
TypeError: For primitive[BatchMatMul], the input argument[w] must be a type of {Tensor[Float16], Tensor[Float32], Tensor[Float64], Tensor[Int16], Tensor[Int32], Tensor[Int64], Tensor[Int8]}, but got Tensor[Complex64].
----------------------------------------------------
- C++ Call Stack: (For framework developers)