Tensorflow version: 2.5
Snpe version: 1.51
Using a pre-trained model from the Tensorflow Model Zoo, I am re-training it to detect only one class of object. Exporting the trained model as saved_model format according to TF2. However, running this through snpe-tensorflow-to-dlc
cli command gives an error that the model is empty.
Command:
snpe-tensorflow-to-dlc --input_network ./models/mobilenet2/mobi/saved_model --input_dim input_tensor "1,320,320,3" --out_node detection_classes --out_node detection_boxes --out_node detection_scores --out_node num_detections --output_path mobilenet_ssd.dlc --show_unconsumed_nodes --debug
Error:
Traceback (most recent call last):
File "/home/mouli/snpe-sdk/snpe-1.51.0.2663/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 71, in <module>
main()
File "/home/mouli/snpe-sdk/snpe-1.51.0.2663/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 67, in main
raise e
File "/home/mouli/snpe-sdk/snpe-1.51.0.2663/bin/x86_64-linux-clang/snpe-tensorflow-to-dlc", line 56, in main
optimized_graph = optimizer.optimize(ir_graph)
File "/home/mouli/snpe-sdk/snpe-1.51.0.2663/lib/python/qti/aisw/converters/common/converter_ir/op_graph_optimizations.py", line 189, in optimize
remove_disconnected_nodes(graph)
File "/home/mouli/snpe-sdk/snpe-1.51.0.2663/lib/python/qti/aisw/converters/common/converter_ir/op_graph_optimizations.py", line 406, in remove_disconnected_nodes
raise ValueError("After pruning disconnected nodes, this model is empty.")
ValueError: After pruning disconnected nodes, this model is empty.
Warnings:
2021-07-20 13:00:46,640 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity with name detection_anchor_indices
2021-07-20 13:00:46,649 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_1 with name detection_boxes
2021-07-20 13:00:46,659 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_2 with name detection_classes
2021-07-20 13:00:46,669 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_3 with name detection_multiclass_scores
2021-07-20 13:00:46,679 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_4 with name detection_scores
2021-07-20 13:00:46,689 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_5 with name num_detections
2021-07-20 13:00:46,701 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_6 with name raw_detection_boxes
2021-07-20 13:00:46,714 - 188 - INFO - INFO_TF_CHANGE_NODE_NAME: Change node name: Identity_7 with name raw_detection_scores
2021-07-20 13:00:50,213 - 405 - WARNING - ERROR_TF_FALLBACK_TO_ONDEMAND_EVALUATION: Unable to resolve operation output shapes in single pass. Using on-demand evaluation!
2021-07-20 13:00:50,217 - 157 - DEBUG_1 - Added buffer named input_tensor:0 of shape [1, 320, 320, 3]
2021-07-20 13:01:31,590 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/TensorArrayV2_2) of type (TensorListReserve) is not supported by converter.
2021-07-20 13:01:31,590 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/StopGradient_1) of type (StopGradient) is not supported by converter.
2021-07-20 13:01:31,590 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/TensorArrayV2Stack/TensorListStack) of type (TensorListStack) is not supported by converter.
2021-07-20 13:01:31,591 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/while) of type (StatelessWhile) is not supported by converter.
2021-07-20 13:01:31,591 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/StopGradient_2) of type (StopGradient) is not supported by converter.
2021-07-20 13:01:31,591 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/TensorArrayV2Stack_1/TensorListStack) of type (TensorListStack) is not supported by converter.
2021-07-20 13:01:31,591 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/TensorArrayV2_1) of type (TensorListReserve) is not supported by converter.
2021-07-20 13:01:31,591 - 193 - WARNING - WARNING_TF_OP_NOT_SUPPORTED: Operation (StatefulPartitionedCall/map/TensorArrayUnstack/TensorListFromTensor) of type (TensorListFromTensor) is not supported by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/truediv_1) of type (ElementWiseDiv) is not consumed by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_6_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalClassHead_4/Reshape) of type (Reshape) is not consumed by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_16_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_5_3x3_s2_128_conv/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,595 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_5_3x3_s2_128_batchnorm/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_10_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_4_depthwise_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_13_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_7_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_4_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/convert_scores) of type (Sigmoid) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_6_expand/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_3_1x1_128_conv/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_5_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_1_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_8_project/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Squeeze) of type (Reshape) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_add/add) of type (ElementWiseSum) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_7_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/scale_logits) of type (ElementWiseMul) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_5_depthwise_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,596 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_10_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_12_project/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_15_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalBoxHead_5/BoxEncodingPredictor/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalBoxHead_2/Reshape) of type (Reshape) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_12_add/add) of type (ElementWiseSum) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_3_1x1_128_batchnorm/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_9_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_15_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_9_expand/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_expand_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_15_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_16_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_3_1x1_128/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_5_expand_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_3_3x3_s2_256_batchnorm/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_5_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_2_expand_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,597 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalBoxHead_4/BoxEncodingPredictor/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_1_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_4_1x1_128_batchnorm/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalBoxHead_3/BoxEncodingPredictor/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_2_expand/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_16_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_12_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_6_expand_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_4_3x3_s2_256/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_5_3x3_s2_128/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalClassHead_2/Reshape) of type (Reshape) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_13_expand/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_10_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/BoxPredictor/ConvolutionalClassHead_0/ClassPredictor/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_2_1x1_256/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_9_depthwise_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_9_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_11_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_3_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,598 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/Reshape_2) of type (Reshape) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/Decode/transpose_1) of type (SSDDecoderLayer) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_2_add/add) of type (ElementWiseSum) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_2_3x3_s2_512/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/expanded_conv_depthwise_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_8_depthwise/depthwise) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_7_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_11_project/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_4_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_11_add/add) of type (ElementWiseSum) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_2_Conv2d_3_3x3_s2_256/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_11_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_1_project_BN/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/FeatureMaps/layer_19_1_Conv2d_5_1x1_64_conv/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_project/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_14_expand/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_5_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/Conv1_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,599 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/bn_Conv1/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_8_expand_relu/Relu6) of type (Relu6) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_9_project/Conv2D) of type (Convolution) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/Conv_1_bn/FusedBatchNormV3) of type (BatchNormalization) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_15_add/add) of type (ElementWiseSum) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/Postprocessor/stack_1) of type (Pack) is not consumed by converter.
2021-07-20 13:01:31,600 - 193 - WARNING - WARNING_TF_LAYER_NOT_CONSUMED: Layer (StatefulPartitionedCall/ssd_mobile_net_v2keras_feature_extractor/model/block_10_depthwise/depthwise) of type (Convolution) is not consumed by converter.
.
.
.
.
.
.
.
.
2021-07-20 13:01:31,615 - 164 - DEBUG_2 - Applying graph Optimizations...
2021-07-20 13:01:31,616 - 164 - DEBUG_2 - Evaluating to match Sequence ['constant', 'elementwise_product', 'constant', 'elementwise_sum']...
2021-07-20 13:01:31,616 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,616 - 164 - DEBUG_2 - Evaluating to match Sequence ['pad']...
2021-07-20 13:01:31,617 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,617 - 164 - DEBUG_2 - Evaluating to match Sequence ['concatenation']...
2021-07-20 13:01:31,617 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,617 - 164 - DEBUG_2 - Evaluating to match Sequence ['concatenation']...
2021-07-20 13:01:31,618 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,618 - 164 - DEBUG_2 - Evaluating to match Sequence ['reshape', 'permute', 'reshape']...
2021-07-20 13:01:31,618 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,618 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum', 'neuron', 'elementwise_product', 'elementwise_product']...
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum', 'neuron', 'elementwise_product', 'elementwise_product']...
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum', 'neuron', 'elementwise_product', 'elementwise_div']...
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,619 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum', 'neuron', 'elementwise_div', 'elementwise_product']...
2021-07-20 13:01:31,620 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,620 - 164 - DEBUG_2 - Evaluating to match Sequence ['reshape', 'permute', 'reshape', 'permute', 'reshape', 'permute', 'reshape']...
2021-07-20 13:01:31,620 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,620 - 164 - DEBUG_2 - Evaluating to match Sequence ['scale']...
2021-07-20 13:01:31,621 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,621 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_product']...
2021-07-20 13:01:31,621 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,621 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_div']...
2021-07-20 13:01:31,622 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,622 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum']...
2021-07-20 13:01:31,622 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,622 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sub']...
2021-07-20 13:01:31,622 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,623 - 164 - DEBUG_2 - Evaluating to match Sequence ['convolution']...
2021-07-20 13:01:31,623 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,623 - 164 - DEBUG_2 - Evaluating to match Sequence ['fully_connected']...
2021-07-20 13:01:31,623 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,623 - 164 - DEBUG_2 - Evaluating to match Sequence ['non_max_suppression']...
2021-07-20 13:01:31,624 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,624 - 164 - DEBUG_2 - Evaluating to match Sequence ['elementwise_sum']...
2021-07-20 13:01:31,624 - 164 - DEBUG_2 - Found 0 match(es)
2021-07-20 13:01:31,624 - 193 - WARNING - Output node detection_classes, specified via command line, does not exist in graph.
2021-07-20 13:01:31,624 - 193 - WARNING - Output node detection_boxes, specified via command line, does not exist in graph.
2021-07-20 13:01:31,624 - 193 - WARNING - Output node detection_scores, specified via command line, does not exist in graph.
2021-07-20 13:01:31,624 - 193 - WARNING - Output node num_detections, specified via command line, does not exist in graph.
2021-07-20 13:01:31,624 - 183 - ERROR - Conversion FAILED!
NOTE: Running the same command on the pre-trained model directly results in the successful conversion of the model.
I am assuming the error is due to the change in the number of classes while re-training the model. What can be done to solve this error? There is minimal information out there regarding this and the Qualcomm Developer forum seems to be completely inactive.
Update: Found the problem to be in the internal script of the object detection API, can be solved by using older commit versions of
exporter_main_v2.py
andexporter_lib_v2.py
To anyone having the same issue, refer to this Github thread, https://github.com/tensorflow/models/issues/10120
Specifically this comment
https://github.com/tensorflow/models/issues/10120#issuecomment-881984975