diff --git a/PaddleCV/yolov3/train.py b/PaddleCV/yolov3/train.py index 310b9926db2be4667ae14f8b4d7c1c584f0111c1..7d09a43232065d4619ce89838065e335eb802f6b 100644 --- a/PaddleCV/yolov3/train.py +++ b/PaddleCV/yolov3/train.py @@ -80,9 +80,11 @@ def train(): return os.path.exists(os.path.join(cfg.pretrain, var.name)) fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist) + build_strategy= fluid.BuildStrategy() + build_strategy.memory_optimize = True compile_program = fluid.compiler.CompiledProgram( fluid.default_main_program()).with_data_parallel( - loss_name=loss.name) + loss_name=loss.name, build_strategy=build_strategy) random_sizes = [cfg.input_size] if cfg.random_shape: