Hello,
We want to use an pretrained model generated by Tensorflow, and convert to .uff file to be used on TX2, but we have a trouble now with transfer the Tensorflow .pb file to .uff file, here is the .pb file we are working on:
http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_2018_01_28.tar.gz
Here's the problem:
1. we cannot find the name_of_output_tensor from this model
2. here's some output node may works:"detection_boxs" "detection_score" "num_detections" "detection_class" "detection_masks",those are response from convert-to-uff -l command.
the error information are as below:
sudo python2.7 convert_to_uff.py tensorflow -o 123.uff --input-file '/home/zngzsys/TF_Models/models-master/research/object_detection/ssd_mobilenet_v1_coco_2017_11_17/frozen_inference_graph.pb' -O 'detection_classes'
Loading /home/zngzsys/TF_Models/models-master/research/object_detection/ssd_mobilenet_v1_coco_2017_11_17/frozen_inference_graph.pb
Using output node detection_classes
Converting to UFF graph
Warning: No conversion function registered for layer: Identity yet.
Converting as custom op Identity detection_classes
name: "detection_classes"
op: "Identity"
input: "add_6"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
Warning: No conversion function registered for layer: TensorArrayGatherV3 yet.
Converting as custom op TensorArrayGatherV3 Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack_2/TensorArrayGatherV3
name: "Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack_2/TensorArrayGatherV3"
op: "TensorArrayGatherV3"
input: "Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArray_6"
input: "Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack_2/range"
input: "Postprocessor/BatchMultiClassNonMaxSuppression/map/while/Exit_3"
attr {
key: "dtype"
value {
type: DT_FLOAT
}
}
attr {
key: "element_shape"
value {
shape {
dim {
size: 100
}
}
}
}
Traceback (most recent call last):
File "convert_to_uff.py", line 109, in <module>
main()
File "convert_to_uff.py", line 104, in main
output_filename=args.output
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 103, in from_tensorflow_frozen_model
return from_tensorflow(graphdef, output_nodes, **kwargs)
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 75, in from_tensorflow
name="main")
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 64, in convert_tf2uff_graph
uff_graph, input_replacements)
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 51, in convert_tf2uff_node
op, name, tf_node, inputs, uff_graph, tf_nodes=tf_nodes)
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 28, in convert_layer
fields = cls.parse_tf_attrs(tf_node.attr)
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 177, in parse_tf_attrs
for key, val in attrs.items()}
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 177, in <dictcomp>
for key, val in attrs.items()}
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 172, in parse_tf_attr_value
return cls.convert_tf2uff_field(code, val)
File "/usr/lib/python2.7/dist-packages/uff/converters/tensorflow/converter.py", line 161, in convert_tf2uff_field
if shp.unknown_rank:
AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'unknown_rank'
So, how can we walk through this problem? we have been stuck by this for two day long.