inference转hub出错
Created by: ClassmateXiaoyu
你好,我使用paddlex训练了一个模型,并已经生成了paddlex inference model,按照说明文档使用hub(paddlehub版本为1.8.1) convert将inference转hub时,出现如下报错:
hub convert --model_dir D:/paddlex_workspace/modules/P0005-T0031_export_model/inference_model --module_name bba_classify
2020-08-21 11:41:31,338-INFO: Instantiated empty configuration.
HDFS initialization failed, please check if .hdfscli,cfg exists.
Traceback (most recent call last):
File "d:\program files (x86)\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\program files (x86)\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Program Files (x86)\Python\Python37\Scripts\hub.exe\__main__.py", line 7, in <module>
File "d:\program files (x86)\python\python37\lib\site-packages\paddlehub\commands\hub.py", line 64, in main
command.execute(argv[1:])
File "d:\program files (x86)\python\python37\lib\site-packages\paddlehub\commands\hub.py", line 51, in execute
return command.execute(argv[1:])
File "d:\program files (x86)\python\python37\lib\site-packages\paddlehub\commands\convert.py", line 149, in execute
self.create_serving_demo_py()
File "d:\program files (x86)\python\python37\lib\site-packages\paddlehub\commands\convert.py", line 102, in create_serving_demo_py
tmpl = Template(template_file.read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 493: illegal multibyte sequence