From 7c7b1d79433ed0647c3a463a9a0ed38bf10a2f55 Mon Sep 17 00:00:00 2001 From: chenguowei01 Date: Mon, 9 Dec 2019 11:53:10 +0800 Subject: [PATCH] update solver.py and model_builder.py --- pdseg/models/model_builder.py | 2 +- pdseg/solver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdseg/models/model_builder.py b/pdseg/models/model_builder.py index 56a959a9..fd74da4e 100644 --- a/pdseg/models/model_builder.py +++ b/pdseg/models/model_builder.py @@ -146,7 +146,7 @@ def build_model(main_prog, start_prog, phase=ModelPhase.TRAIN): if ModelPhase.is_predict(phase): origin_image = fluid.layers.data( name='image', - shape=[-1, 1, 1, cfg.DATASET.DATA_DIM], + shape=[-1, -1, -1, cfg.DATASET.DATA_DIM], dtype='float32', append_batch_size=False) image = fluid.layers.transpose(origin_image, [0, 3, 1, 2]) diff --git a/pdseg/solver.py b/pdseg/solver.py index 0e3b1c57..392a21d4 100644 --- a/pdseg/solver.py +++ b/pdseg/solver.py @@ -18,7 +18,7 @@ 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 +from paddle.fluid.contrib.mixed_precision.decorator import OptimizerWithMixedPrecision, decorate, AutoMixedPrecisionLists class Solver(object): -- GitLab