diff --git a/ppcls/optimizer/optimizer.py b/ppcls/optimizer/optimizer.py index a91b57c74e8851744b57001f121cc63faf277f24..8e4ca9e9983abcb642ab838f47c86e25cf74bd70 100644 --- a/ppcls/optimizer/optimizer.py +++ b/ppcls/optimizer/optimizer.py @@ -17,6 +17,9 @@ from __future__ import division from __future__ import print_function import inspect +# for python3.11 +if not hasattr(inspect, 'getargspec'): + inspect.getargspec = inspect.getfullargspec from paddle import optimizer as optim from ppcls.utils import logger