When doing the build with ssd_mobilenet_v1 (i just download from TF detection zoon and retrained the model with my own data), i met an error:
[TensorRT] ERROR: UFFParser: Parser error: BoxPredictor_0/Reshape: Reshape: -1 dimension specified more than 1 time
TF version: =1.14.0
Jetpack: 4.2
TensorRT: 5.0
Do you have any ideas? what’s missing here?
Many thanks!
details
amvi@nvidia-nano:~/zhen/tensorrt_demos/ssd$ ./build_engines.sh
for model in ssd_mobilenet_v1_egohands
python3 build_engine.py ssd_mobilenet_v1_egohands
[TensorRT] INFO: Plugin Creator registration succeeded - GridAnchor_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - NMS_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - Reorg_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - Region_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - Clip_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - LReLU_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - PriorBox_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - Normalize_TRT
[TensorRT] INFO: Plugin Creator registration succeeded - RPROI_TRT
WARNING:tensorflow:From /usr/lib/python3.6/dist-packages/graphsurgeon/StaticGraph.py:123: FastGFile.init (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
WARNING: To create TensorRT plugin nodes, please use the create_plugin_node function instead.
UFF Version 0.5.5
=== Automatically deduced input nodes ===
[name: “Input”
op: “Placeholder”
attr {
key: “dtype”
value {
type: DT_FLOAT
}
}
attr {
key: “shape”
value {
shape {
dim {
size: 1
}
dim {
size: 3
}
dim {
size: 300
}
dim {
size: 300
}
}
}
}
]
Using output node NMS
Converting to UFF graph
Warning: No conversion function registered for layer: NMS_TRT yet.
Converting NMS as custom op: NMS_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_loc as custom op: FlattenConcat_TRT
Warning: No conversion function registered for layer: GridAnchor_TRT yet.
Converting MultipleGridAnchorGenerator as custom op: GridAnchor_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_conf as custom op: FlattenConcat_TRT
No. nodes: 450
UFF Output written to /home/camvi/zhen/tensorrt_demos/ssd/tmp_v1_egohands.uff
UFF Text Output written to /home/camvi/zhen/tensorrt_demos/ssd/tmp_v1_egohands.pbtxt
[TensorRT] INFO: UFFParser: parsing Input
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_0/weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Conv2D
[TensorRT] INFO: UFFParser: Convolution: add Padding Layer to support asymmetric padding
[TensorRT] INFO: UFFParser: Convolution: Left: 0
[TensorRT] INFO: UFFParser: Convolution: Right: 1
[TensorRT] INFO: UFFParser: Convolution: Top: 0
[TensorRT] INFO: UFFParser: Convolution: Bottom: 1
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/gamma
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/beta
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_mean
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_0/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_0/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 9) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 11) to 0.0472441
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/depthwise_weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/depthwise
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/gamma
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/beta
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_mean
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_depthwise/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_depthwise/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 19) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 21) to 0.0472441
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_1_pointwise/weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_1_pointwise/Conv2D
…
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_depthwise/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_10_depthwise/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_10_depthwise/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 201) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 203) to 0.0472441
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_10_pointwise/Conv2D
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/gamma
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/beta
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_mean
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_10_pointwise/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_10_pointwise/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_10_pointwise/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 211) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 213) to 0.0472441
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/depthwise_weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_depthwise/depthwise
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/gamma
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/beta
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_mean
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_depthwise/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_depthwise/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_depthwise/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 221) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 223) to 0.0472441
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/weights
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_pointwise/Conv2D
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/gamma
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/beta
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_mean
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/Conv2d_11_pointwise/BatchNorm/moving_variance
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_pointwise/BatchNorm/FusedBatchNorm
[TensorRT] INFO: UFFParser: parsing FeatureExtractor/MobilenetV1/MobilenetV1/Conv2d_11_pointwise/Relu6
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 231) to 0.0472441
[TensorRT] INFO: Setting Dynamic Range for (Unnamed ITensor* 233) to 0.0472441
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/BoxEncodingPredictor/weights
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/BoxEncodingPredictor/Conv2D
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/BoxEncodingPredictor/biases
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/BoxEncodingPredictor/BiasAdd
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Shape
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/strided_slice/stack
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/strided_slice/stack_1
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/strided_slice/stack_2
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/strided_slice
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Reshape/shape/1
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Reshape/shape/2
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Reshape/shape/3
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Reshape/shape
[TensorRT] INFO: UFFParser: parsing BoxPredictor_0/Reshape
[TensorRT] ERROR: UFFParser: Parser error: BoxPredictor_0/Reshape: Reshape: -1 dimension specified more than 1 time
[TensorRT] ERROR: Network must have at least one output
Traceback (most recent call last):
File “build_engine.py”, line 218, in
main()
File “build_engine.py”, line 212, in main
buf = engine.serialize()
AttributeError: ‘NoneType’ object has no attribute ‘serialize’