diff --git a/pdseg/solver.py b/pdseg/solver.py index 392a21d4aeeb02729b9c8dd4af3888fbc6f13d5f..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 OptimizerWithMixedPrecision, 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):