ERROR: Failed to parse the ONNX file

When I used the onnx model(arcface-resnet50) to generate the tensorrt engine, I received an error as follows:
ERROR
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
[TensorRT] ERROR: (Unnamed Layer* 11) [Parametric ReLU]: slope tensor must be unidirectional broadcastable to input tensor
ERROR: Failed to parse the ONNX file.
In node 6 (scaleHelper): UNSUPPORTED_NODE: Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
Traceback (most recent call last):
File “onnx2engine.py”, line 136, in
run(onnx_file_path)
File “onnx2engine.py”, line 131, in run
f.write(engine.serialize())
AttributeError: ‘NoneType’ object has no attribute ‘serialize’

ENVIRONMENT
TensorRT Version - 7.0.0.11
GPU Type - GeForce RTX 2080Ti
Nvidia Driver Version - 440.59
CUDA Version - 10.0.130
CUDNN Version - 7.6.0
Operating System + Version - ubuntu18.04
Python Version - 3.6.9
Mxnet Version - 1.5.1
Onnx Version - 1.2.1
Please help me to solve this problem. Thanks!

Hi @wangzaixiaokutou,
Request you to share your onnx model so that i can assist you better.

Thanks!

Uploading: model.zip… This is my onnx model file.

Thanks!

Hi @wangzaixiaokutou
I couldnt download the model from the link you provided.
Can you please upload it on the drive and share the link, or DM directly.

Thanks!

The link is “https://drive.google.com/file/d/1AAsu1q_IwFl_hz8Bu6tr1LRWc5yBql7A/view?usp=sharing”.

Thanks!

Hi, i’m sorry to bother you. I want to know if the problem I raised has been resolved.

Hi @wangzaixiaokutou,
Kindly grant the access to the model.

Thanks!

Kindly try this link.“https://drive.google.com/file/d/1AAsu1q_IwFl_hz8Bu6tr1LRWc5yBql7A/view?usp=sharing

Thanks!

Hi, can you get the access to the model?

Hi @wangzaixiaokutou,

I could reproduce the issue from your model.
Checking with the team on this issue.

Thanks!

Thanks so much!

Hi, i find that my model is without ‘Reshape’ node before PRelu node, and the model with it can be parsed successfully.

1 Like