From a62fd058ea540f145197ab0a33f80f72eba3f264 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Wed, 11 Dec 2019 13:34:34 +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 0e3b1c57..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 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): -- GitLab