未验证 提交 b3d608e2 编写于 作者: 0 0x45f 提交者: GitHub

Remove wrong check_variable_and_dtype in matrix_rank (#42062) (#42085)

上级 3475c2bf
...@@ -1338,7 +1338,6 @@ def matrix_rank(x, tol=None, hermitian=False, name=None): ...@@ -1338,7 +1338,6 @@ def matrix_rank(x, tol=None, hermitian=False, name=None):
if tol is None: if tol is None:
attrs['use_default_tol'] = True attrs['use_default_tol'] = True
elif isinstance(tol, Variable): elif isinstance(tol, Variable):
check_variable_and_dtype(tol, 'tol', ['float32'], 'matrix_rank')
attrs['use_default_tol'] = False attrs['use_default_tol'] = False
if tol.dtype != x.dtype: if tol.dtype != x.dtype:
inputs['TolTensor'] = cast(tol, x.dtype) inputs['TolTensor'] = cast(tol, x.dtype)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册