未验证 提交 ac848627 编写于 作者: S SunAhong1993 提交者: GitHub

Update convert.py

上级 0ca66b21
......@@ -41,8 +41,12 @@ def convert(def_path, caffemodel_path, data_output_path, code_output_path,
np.save(data_out, data)
if code_output_path:
print_stderr('Saving source...')
s = sys.version
with open(code_output_path, 'wb') as src_out:
src_out.write(str.encode(transformer.transform_source()))
if s.startswith('2'):
src_out.write(transformer.transform_source())
else:
src_out.write(str.encode(transformer.transform_source()))
print_stderr('set env variable before using converted model '\
'if used custom_layers:')
custom_pk_path = os.path.dirname(os.path.abspath(__file__))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册