Skip to content

Commit

Permalink
Fix python.v2.fluid arg parse (#6055)
Browse files Browse the repository at this point in the history
* fix python gflags init

* format code
  • Loading branch information
QiJune authored Nov 30, 2017
1 parent dc91c4e commit 82dd165
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/v2/fluid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def __read_gflags_from_env__():
read_env_flags = ['use_pinned_memory']
if core.is_compile_gpu():
read_env_flags.append('fraction_of_gpu_memory_to_use')
core.init_gflags(sys.argv + ["--tryfromenv=" + ",".join(read_env_flags)])
core.init_gflags([sys.argv[0]] +
["--tryfromenv=" + ",".join(read_env_flags)])


__read_gflags_from_env__()

0 comments on commit 82dd165

Please sign in to comment.