File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- from __future__ import absolute_import
16
- from __future__ import division
17
- from __future__ import print_function
18
-
19
15
import inspect
20
- # for python3.11
21
- if not hasattr (inspect , 'getargspec' ):
22
- inspect .getargspec = inspect .getfullargspec
23
-
24
16
import paddle
25
17
from paddle import optimizer as optim
26
18
from ppcls .utils import logger
@@ -66,7 +58,7 @@ def __call__(self, model_list):
66
58
# model_list is None in static graph
67
59
parameters = sum ([m .parameters () for m in model_list ],
68
60
[]) if model_list else None
69
- argspec = inspect .getargspec (optim .SGD .__init__ ).args
61
+ argspec = inspect .getfullargspec (optim .SGD .__init__ ).args
70
62
if 'multi_precision' in argspec :
71
63
opt = optim .SGD (learning_rate = self .learning_rate ,
72
64
parameters = parameters ,
You can’t perform that action at this time.
0 commit comments