[8] Assertion failed: inputs.at(2).is_weights() && "Clip max value must be an initializer!"

Hi Nvidia Team,

I am converting my ONNX model(exported from Pytorch) to TRT Model. During the conversion, i am facing an Issue as: [8] Assertion failed: inputs.at(2).is_weights() && "Clip max value must be an initializer!"

I am attaching the verbose below:

[03/26/2021-17:49:11] [V] [TRT] Registering layer: Concat_790 for ONNX node: Concat_790
[03/26/2021-17:49:11] [V] [TRT] Registering tensor: 1327 for ONNX tensor: 1327
[03/26/2021-17:49:11] [V] [TRT] Concat_790 [Concat] outputs: [1327 -> (-1, -1, -1)], 
[03/26/2021-17:49:11] [V] [TRT] Parsing node: Constant_791 [Constant]
[03/26/2021-17:49:11] [V] [TRT] Constant_791 [Constant] inputs: 
[03/26/2021-17:49:11] [V] [TRT] Constant_791 [Constant] outputs: [1328 -> ()], 
[03/26/2021-17:49:11] [V] [TRT] Parsing node: Gather_792 [Gather]
[03/26/2021-17:49:11] [V] [TRT] Searching for input: 1327
[03/26/2021-17:49:11] [V] [TRT] Searching for input: 1328
[03/26/2021-17:49:11] [V] [TRT] Gather_792 [Gather] inputs: [1327 -> (-1, -1, -1)], [1328 -> ()], 
[03/26/2021-17:49:11] [V] [TRT] Registering constant layer: 1328 for ONNX initializer: 1328
[03/26/2021-17:49:11] [V] [TRT] Using Gather axis: 2
[03/26/2021-17:49:11] [V] [TRT] Registering layer: Gather_792 for ONNX node: Gather_792
[03/26/2021-17:49:11] [V] [TRT] Registering tensor: 1329 for ONNX tensor: 1329
[03/26/2021-17:49:11] [V] [TRT] Gather_792 [Gather] outputs: [1329 -> (-1, -1)], 
[03/26/2021-17:49:11] [V] [TRT] Parsing node: Clip_793 [Clip]
[03/26/2021-17:49:11] [V] [TRT] Searching for input: 1329
[03/26/2021-17:49:11] [V] [TRT] Searching for input: 1849
[03/26/2021-17:49:11] [V] [TRT] Clip_793 [Clip] inputs: [1329 -> (-1, -1)], [1849 -> ()], [optional input, not set], 
[03/26/2021-17:49:11] [E] [TRT] /home/darshan/onnx-tensorrt/ModelImporter.cpp:703: While parsing node number 793 [Clip -> "1333"]:
[03/26/2021-17:49:11] [E] [TRT] /home/darshan/onnx-tensorrt/ModelImporter.cpp:704: --- Begin node ---
[03/26/2021-17:49:11] [E] [TRT] /home/darshan/onnx-tensorrt/ModelImporter.cpp:705: input: "1329"
input: "1849"
input: ""
output: "1333"
name: "Clip_793"
op_type: "Clip"

    [03/26/2021-17:49:11] [E] [TRT] /home/darshan/onnx-tensorrt/ModelImporter.cpp:706: --- End node ---
    [03/26/2021-17:49:11] [E] [TRT] /home/darshan/onnx-tensorrt/ModelImporter.cpp:709: ERROR: /home/darshan/onnx-tensorrt/builtin_op_importers.cpp:430 In function importClip:
    [8] Assertion failed: inputs.at(2).is_weights() && "Clip max value must be an initializer!"
    [03/26/2021-17:49:11] [E] Failed to parse onnx file
    [03/26/2021-17:49:11] [E] Parsing model failed
    [03/26/2021-17:49:11] [E] Engine creation failed
    [03/26/2021-17:49:11] [E] Engine set up failed

May I know how to resolve it?

Thanks,
Darshan

Hi @darshancganji12,

Hope following link will help you.

Thank you.