提交 226f775b 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix enable_inplace (#3131)

上级 81d99804
......@@ -57,7 +57,7 @@ def get_save_image_name(output_dir, image_path):
"""
if not os.path.exists(output_dir):
os.makedirs(output_dir)
image_name = image_path.split('/')[-1]
image_name = os.path.split(image_path)[-1]
name, ext = os.path.splitext(image_name)
return os.path.join(output_dir, "{}".format(name)) + ext
......
......@@ -134,7 +134,7 @@ def main():
# compile program for multi-devices
build_strategy = fluid.BuildStrategy()
build_strategy.memory_optimize = False
build_strategy.enable_inplace = True
build_strategy.enable_inplace = False
sync_bn = getattr(model.backbone, 'norm_type', None) == 'sync_bn'
# only enable sync_bn in multi GPU devices
build_strategy.sync_batch_norm = sync_bn and devices_num > 1 \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册