From b3d608e21daa699b4b6bc8251b8660e7b3d185d2 Mon Sep 17 00:00:00 2001 From: 0x45f <23097963+0x45f@users.noreply.github.com> Date: Fri, 22 Apr 2022 17:12:36 +0800 Subject: [PATCH] Remove wrong check_variable_and_dtype in matrix_rank (#42062) (#42085) --- python/paddle/tensor/linalg.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/paddle/tensor/linalg.py b/python/paddle/tensor/linalg.py index e11d8f3aad7..1be53407688 100644 --- a/python/paddle/tensor/linalg.py +++ b/python/paddle/tensor/linalg.py @@ -1338,7 +1338,6 @@ def matrix_rank(x, tol=None, hermitian=False, name=None): if tol is None: attrs['use_default_tol'] = True elif isinstance(tol, Variable): - check_variable_and_dtype(tol, 'tol', ['float32'], 'matrix_rank') attrs['use_default_tol'] = False if tol.dtype != x.dtype: inputs['TolTensor'] = cast(tol, x.dtype) -- GitLab