AttributeError: 'NoneType' object has no attribute 'serialize'

Description

[TensorRT] ERROR: UFFParser: Validator error: FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise/BatchNorm/FusedBatchNormV3: Unsupported operation _FusedBatchNormV3
[TensorRT] ERROR: Network must have at least one output
Traceback (most recent call last):
File “main.py”, line 44, in
buf = engine.serialize()
AttributeError: ‘NoneType’ object has no attribute ‘serialize’

Environment

TensorRT Version: 5.0.6.3
GPU Type: Jetson TX2
Nvidia Driver Version: x
CUDA Version: 10.0
CUDNN Version: 7.3.1
Operating System + Version: Jetpack 4.2 + ubuntu 18.04
Python Version (if applicable): 3.6.9
TensorFlow Version (if applicable): 1.14.0
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

How to solve it?

Hi,
FusedBatchNormV3 operation is currently not supported by UFF parser.

You can try to convert your model to ONNX instead of UFF using tf2onnx:


tf2onnx supports converting this op to BatchNormalization op in ONNX:

And BatchNormalization op is supported by the TensorRT ONNX parser:

I will also recommend you to use latest TRT version.

Thanks

Is it working on jetson tx2 and jetpack 4.2?