From fd338b251ead8cf90edd8943e7e2063f1c97234b Mon Sep 17 00:00:00 2001 From: chenguowei01 Date: Mon, 9 Dec 2019 12:58:17 +0800 Subject: [PATCH] update solver.py --- pdseg/solver.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdseg/solver.py b/pdseg/solver.py index 392a21d4..baec69be 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): -- GitLab