From 5c73822396151bd0c419bdef95ca1b8cc0482e02 Mon Sep 17 00:00:00 2001 From: 0x45f <23097963+0x45f@users.noreply.github.com> Date: Thu, 21 Apr 2022 16:08:30 +0800 Subject: [PATCH] Remove wrong check_variable_and_dtype in matrix_rank (#42062) --- 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 6006a9dec0c..2c1732ad628 100644 --- a/python/paddle/tensor/linalg.py +++ b/python/paddle/tensor/linalg.py @@ -1441,7 +1441,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