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


I am using TensorRT engine for inference using Jetson TX2

I converted tensorflow freezed graph model.pb file of face detector FaceBoxes to faceboxes.onnx file first.
And while creating the engine.plan from faceboxes.onnx file, I am facing the following issue.

I have included the error log and required files as well.
Any help will be apprecieted. Thanks

Unsupported ONNX data type: UINT8 (2)
Traceback (most recent call last):
File “”, line 20, in
engine = eng.build_engine(onnx_path, shape= shape)
File “/home/nvidia/attendance-system/optimization/”, line 18, in build_engine
network.get_input(0).shape = shape
AttributeError: ‘NoneType’ object has no attribute ‘shape’


TensorRT Version :
GPU Type : Jetson TX2
CUDA Version : 10.2.89
CUDNN Version :
Operating System + Version : jetpack 4.4.1
TensorFlow Version (if applicable) : 2.3.1+nv20.10

Relevant Files

faceboxes3.onnx (3.9 MB) (1.1 KB) (625 Bytes)
model.pb (4.0 MB)

Steps to Reproduce

Hi @ammaz99,

Looks like you’re using UINT8. Currently UINT8 is not supported. You need to use INT8 instead.
Hope following temporary fix may help you.

Thank you.