未验证 提交 6ad98fae 编写于 作者: K Kaipeng Deng 提交者: GitHub

Merge pull request #2091 from heavengate/fix_yolo_mem_pick

mem_opt for yolov3.
...@@ -80,9 +80,11 @@ def train(): ...@@ -80,9 +80,11 @@ def train():
return os.path.exists(os.path.join(cfg.pretrain, var.name)) return os.path.exists(os.path.join(cfg.pretrain, var.name))
fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist) fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist)
build_strategy= fluid.BuildStrategy()
build_strategy.memory_optimize = True
compile_program = fluid.compiler.CompiledProgram( compile_program = fluid.compiler.CompiledProgram(
fluid.default_main_program()).with_data_parallel( fluid.default_main_program()).with_data_parallel(
loss_name=loss.name) loss_name=loss.name, build_strategy=build_strategy)
random_sizes = [cfg.input_size] random_sizes = [cfg.input_size]
if cfg.random_shape: if cfg.random_shape:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册