我正在尝试将预先训练好的caffe模型here转换为tensorflow this converter,这似乎是最受欢迎的选项。然而,当我运行他们的脚本
$ python3 convert.py ../colorful-colorization/models/colorization_deploy_v2.prototxt --caffemodel ../colorful-colorization/models/colorization_release_v2.caffemodel --code-output-path ./out-code/mynet.py
我收到以下错误
Traceback (most recent call last):
File "convert.py", line 60, in <module>
main()
File "convert.py", line 56, in main
args.phase)
File "convert.py", line 27, in convert
transformer = TensorFlowTransformer(def_path, caffemodel_path, phase=phase)
File "/home/ebalda/Documents/Python/playground/caffe2tensorflow/kaffe/tensorflow/transformer.py", line 221, in __init__
self.load(def_path, data_path, phase)
File "/home/ebalda/Documents/Python/playground/caffe2tensorflow/kaffe/tensorflow/transformer.py", line 227, in load
graph = GraphBuilder(def_path, phase).build()
File "/home/ebalda/Documents/Python/playground/caffe2tensorflow/kaffe/graph.py", line 140, in __init__
self.load()
File "/home/ebalda/Documents/Python/playground/caffe2tensorflow/kaffe/graph.py", line 146, in load
text_format.Merge(def_file.read(), self.params)
File "/usr/local/lib/python3.6/dist-packages/google/protobuf/text_format.py", line 521, in Merge
text.split('\n'),
TypeError: a bytes-like object is required, not 'str'
在github和stackoverflow中浏览后,我找不到其他有类似问题的人。有谁知道可能是什么问题?