使用tfcorem将Tensorflow转换为coreML时出错

2024-05-05 12:13:10 发布

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

我想用coreML做手工追踪。你知道吗

为此,我采用了现成的tensorFlow模型:https://github.com/timctho/convolutional-pose-machines-tensorflow

我试着用tf coreML把它转换成coreML。但在转换过程中我会出错。你知道吗

(base) MBP-Alexey:Desktop alexeygorbunov$ python convert_tf_to_coreml.py

Loading the TF graph...
Traceback (most recent call last):   
File "convert_tf_to_coreml.py", line 5, in <module>
    input_name_shape_dict  = { ' input_placeholder: 0 ' : [ 1 , 256 , 256 , 3 ]})   
File "/Users/alexeygorbunov/anaconda3/lib/python3.7/site packages/tfcoreml/_tf_coreml_converter.py", line 586, in convert
    custom_conversion_functions=custom_conversion_functions)   
File "/Users/alexeygorbunov/anaconda3/lib/python3.7/site-packages/tfcoreml/_tf_coreml_converter.py", line 150, in _convert_pb_to_mlmodel
 gdef.ParseFromString(serialized)  
google.protobuf.message.DecodeError: Error parsing message

可能出现什么错误以及如何解决?你知道吗


Tags: toinpyconvertinputlibtfline