提交 3b5bed68 编写于 作者: Y Yu Yang

Add dump binary config

上级 987a908f
......@@ -20,6 +20,7 @@ __all__ = []
if __name__ == '__main__':
whole_conf = False
binary = False
if len(sys.argv) == 2:
conf = parse_config(sys.argv[1], '')
elif len(sys.argv) == 3:
......@@ -28,6 +29,8 @@ if __name__ == '__main__':
conf = parse_config(sys.argv[1], sys.argv[2])
if sys.argv[3] == '--whole':
whole_conf = True
elif sys.argv[3] == '--binary':
binary = True
else:
raise RuntimeError()
......@@ -36,4 +39,7 @@ if __name__ == '__main__':
if whole_conf:
print conf
else:
print conf.model_config
if binary:
sys.stdout.write(conf.SerializeToString())
else:
print conf.model_config
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册