diff --git a/pdseg/solver.py b/pdseg/solver.py index 0e3b1c57f774b050c0804f3149ad7301cdfa5ff3..baec69be06c4c2eb6d5e78480d5ffe9e1c737434 100644 --- a/pdseg/solver.py +++ b/pdseg/solver.py @@ -18,7 +18,10 @@ import paddle.fluid as fluid import numpy as np import importlib from utils.config import cfg -from paddle.fluid.contrib.mixed_precision.decorator import OptimizerWithMixedPrecison, decorate, AutoMixedPrecisionLists +try: + from paddle.fluid.contrib.mixed_precision.decorator import OptimizerWithMixedPrecison, decorate, AutoMixedPrecisionLists +except: + from paddle.fluid.contrib.mixed_precision.decorator import OptimizerWithMixedPrecision, decorate, AutoMixedPrecisionLists class Solver(object):