Python 不完整的形状。和google.protobuf.message.DecodeError:标记中的导线类型错误
有一个问题:由于形状不完整,317次操作没有失败统计。 模型可以导出,但预测时会出现问题,如下图:Python 不完整的形状。和google.protobuf.message.DecodeError:标记中的导线类型错误,python,tensorflow,object-detection-api,Python,Tensorflow,Object Detection Api,有一个问题:由于形状不完整,317次操作没有失败统计。 模型可以导出,但预测时会出现问题,如下图: ... SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv2 (--/2.36m params) SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv2/Bat
...
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv2 (--/2.36m params)
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv2/BatchNorm (--/0 params)
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv2/weights (3x3x512x512, 2.36m/2.36m params)
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv3 (--/1.05m params)
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv3/BatchNorm (--/0 params)
SecondStageFeatureExtractor/resnet_v1_50/block4/unit_3/bottleneck_v1/conv3/weights (1x1x512x2048, 1.05m/1.05m params)
======================End of Report==========================
317 ops no flops stats due to incomplete shapes.
Parsing Inputs...
=========================Options=============================
-max_depth 10000
-min_bytes 0
-min_peak_bytes 0
-min_residual_bytes 0
-min_output_bytes 0
-min_micros 0
-min_accelerator_micros 0
...
回溯(最近一次呼叫最后一次):
文件“D:/tensorflowAPI/models/research/object\u detection/legacy/predict.py”,第229行,在
detecotr=TOD(路径到CKPT,路径到标签)
文件“D:/tensorflowAPI/models/research/object\u detection/legacy/predict.py”,第172行,在\uu init中__
self.detection\u graph=self.\u load\u model()
文件“D:/tensorflowAPI/models/research/object\u detection/legacy/predict.py”,第181行,加载模型
od_图形_def.ParseFromString(序列化_图形)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\message.py”,第199行,格式为ParseFromString
返回self.MergeFromString(序列化)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\python\u message.py”,第1145行,位于MergeFromString中
if self.\u InternalParse(序列化,0,长度)!=长度:
InternalParse中的文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\python\u message.py”,第1212行
pos=字段解码器(缓冲区、新字段、结束、自身、字段dict)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”,第754行,在DecodeField中
if值。_InternalParse(缓冲区、位置、新位置)!=新职位:
InternalParse中的文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\python\u message.py”,第1212行
pos=字段解码器(缓冲区、新字段、结束、自身、字段dict)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”,第733行,位于DecodeRepeatedField中
if value.add()。_InternalParse(缓冲区、位置、新位置)!=新职位:
InternalParse中的文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\python\u message.py”,第1212行
pos=字段解码器(缓冲区、新字段、结束、自身、字段dict)
DecodeMap中第888行的文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”
如果子消息。_InternalParse(缓冲区、位置、新位置)!=新职位:
InternalParse中的文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\python\u message.py”,第1199行
缓冲区,新(位置,接线类型)#pylint:disable=受保护访问
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”,第989行,在_decodeUnknown字段中
(数据,位置)=\u解码未知字段集(缓冲区,位置)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”,第968行,在_DecodeUnknownFieldSet中
(数据,位置)=\u解码未知字段(缓冲器,位置,导线类型)
文件“D:\Anaconda\envs\tf gpu\lib\site packages\google\protobuf\internal\decoder.py”,第993行,在_decodeUnknown字段中
raise _DecodeError('标签中的导线类型错误')
google.protobuf.message.DecodeError:标记中的导线类型错误。
进程已完成,退出代码为1
这就是错误:google.protobuf.message.decode错误:标签中的导线类型错误。
我怎样才能解决它
如果[export\u expression\u graph.py]文件中的[input\u shape]参数设置与否,则该参数无效
Traceback (most recent call last):
File "D:/tensorflowAPI/models/research/object_detection/legacy/predict.py", line 229, in <module>
detecotr = TOD(PATH_TO_CKPT, PATH_TO_LABELS)
File "D:/tensorflowAPI/models/research/object_detection/legacy/predict.py", line 172, in __init__
self.detection_graph = self._load_model()
File "D:/tensorflowAPI/models/research/object_detection/legacy/predict.py", line 181, in _load_model
od_graph_def.ParseFromString(serialized_graph)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\message.py", line 199, in ParseFromString
return self.MergeFromString(serialized)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\python_message.py", line 1145, in MergeFromString
if self._InternalParse(serialized, 0, length) != length:
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\python_message.py", line 1212, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 754, in DecodeField
if value._InternalParse(buffer, pos, new_pos) != new_pos:
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\python_message.py", line 1212, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 733, in DecodeRepeatedField
if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\python_message.py", line 1212, in InternalParse
pos = field_decoder(buffer, new_pos, end, self, field_dict)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 888, in DecodeMap
if submsg._InternalParse(buffer, pos, new_pos) != new_pos:
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\python_message.py", line 1199, in InternalParse
buffer, new_pos, wire_type) # pylint: disable=protected-access
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 989, in _DecodeUnknownField
(data, pos) = _DecodeUnknownFieldSet(buffer, pos)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 968, in _DecodeUnknownFieldSet
(data, pos) = _DecodeUnknownField(buffer, pos, wire_type)
File "D:\Anaconda\envs\tf-gpu\lib\site-packages\google\protobuf\internal\decoder.py", line 993, in _DecodeUnknownField
raise _DecodeError('Wrong wire type in tag.')
google.protobuf.message.DecodeError: Wrong wire type in tag.
Process finished with exit code 1