未验证 提交 e2075983 编写于 作者: W wangchaochaohu 提交者: GitHub

update model config for yolov3 (#2429)

* update

* fix
上级 b4860ab4
......@@ -16,6 +16,18 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
def set_paddle_flags(flags):
for key, value in flags.items():
if os.environ.get(key, None) is None:
os.environ[key] = str(value)
set_paddle_flags({
'FLAGS_eager_delete_tensor_gb': 0, # enable gc
'FLAGS_memory_fraction_of_eager_deletion': 1,
'FLAGS_fraction_of_gpu_memory_to_use': 0.98
})
import sys
import numpy as np
import random
......@@ -83,7 +95,7 @@ def train():
fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist)
build_strategy = fluid.BuildStrategy()
build_strategy.memory_optimize = True
build_strategy.memory_optimize = False #gc and memory optimize may conflict
build_strategy.sync_batch_norm = cfg.syncbn
compile_program = fluid.compiler.CompiledProgram(fluid.default_main_program(
)).with_data_parallel(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册