UnicodeDecodeError:“utf8”编解码器无法解码位置93中的字节0xd5:无效的连续字节

2022-01-19 00:44:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用web https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/training.html#exporting-a-trained-model的教程,在导出经过训练的模型的步骤中,当我键入代码时

python .\exporter_main_v2.py --input_type image_tensor --pipeline_config_path .\models\my_efficientdet_d1\pipeline.config --trained_checkpoint_dir .\models\my_efficientdet_d1\ --output_directory .\exported-models\my_model

它伴随着一个错误:

Traceback (most recent call last):
  File ".\exporter_main_v2.py", line 165, in <module>
    app.run(main)
  File "d:\anaconda3\envs\tensorflow\lib\site-packages\absl\app.py", line 303, in run
    _run_main(main, args)
  File "d:\anaconda3\envs\tensorflow\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))
  File ".\exporter_main_v2.py", line 156, in main
    text_format.Merge(f.read(), pipeline_config)
  File "d:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 117, in read
    self._preread_check()
  File "d:\anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 79, in _preread_check
    self._read_buf = _pywrap_file_io.BufferedInputStream(
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 93: invalid continuation byte

有人能告诉我怎么解决吗