Problem converting tensorflow model to TensorRT

Hi, I want to convert a custom TensorFlow model to TensorRT and run it in jetson nano. I already tried to convert from TensorFlow to onnx. I have difficulties executing trtexec and here is the error.

jetson@nano:~$ /usr/src/tensorrt/bin/trtexec --onnx=/home/jetson/self_driving/vit_onnx.onnx --shapes='input_1:0':1x240x240x3 --saveEngine=/home/jetson/self_driving/engine.trt --verbose --explicitBatch
&&&& RUNNING TensorRT.trtexec [TensorRT v8001] # /usr/src/tensorrt/bin/trtexec --onnx=/home/jetson/self_driving/vit_onnx.onnx --shapes=‘input_1:0’:1x240x240x3 --saveEngine=/home/jetson/self_driving/engine.trt --verbose --explicitBatch
[02/28/2024-14:00:24] [I] === Model Options ===
[02/28/2024-14:00:24] [I] Format: ONNX
[02/28/2024-14:00:24] [I] Model: /home/jetson/self_driving/vit_onnx.onnx
[02/28/2024-14:00:24] [I] Output:
[02/28/2024-14:00:24] [I] === Build Options ===
[02/28/2024-14:00:24] [I] Max batch: explicit
[02/28/2024-14:00:24] [I] Workspace: 16 MiB
[02/28/2024-14:00:24] [I] minTiming: 1
[02/28/2024-14:00:24] [I] avgTiming: 8
[02/28/2024-14:00:24] [I] Precision: FP32
[02/28/2024-14:00:24] [I] Calibration:
[02/28/2024-14:00:24] [I] Refit: Disabled
[02/28/2024-14:00:24] [I] Sparsity: Disabled
[02/28/2024-14:00:24] [I] Safe mode: Disabled
[02/28/2024-14:00:24] [I] Restricted mode: Disabled
[02/28/2024-14:00:24] [I] Save engine: /home/jetson/self_driving/engine.trt
[02/28/2024-14:00:24] [I] Load engine:
[02/28/2024-14:00:24] [I] NVTX verbosity: 0
[02/28/2024-14:00:24] [I] Tactic sources: Using default tactic sources
[02/28/2024-14:00:24] [I] timingCacheMode: local
[02/28/2024-14:00:24] [I] timingCacheFile:
[02/28/2024-14:00:24] [I] Input(s)s format: fp32:CHW
[02/28/2024-14:00:24] [I] Output(s)s format: fp32:CHW
[02/28/2024-14:00:24] [I] Input build shape: input_1:0=1x240x240x3+1x240x240x3+1x240x240x3
[02/28/2024-14:00:24] [I] Input calibration shapes: model
[02/28/2024-14:00:24] [I] === System Options ===
[02/28/2024-14:00:24] [I] Device: 0
[02/28/2024-14:00:24] [I] DLACore:
[02/28/2024-14:00:24] [I] Plugins:
[02/28/2024-14:00:24] [I] === Inference Options ===
[02/28/2024-14:00:24] [I] Batch: Explicit
[02/28/2024-14:00:24] [I] Input inference shape: input_1:0=1x240x240x3
[02/28/2024-14:00:24] [I] Iterations: 10
[02/28/2024-14:00:24] [I] Duration: 3s (+ 200ms warm up)
[02/28/2024-14:00:24] [I] Sleep time: 0ms
[02/28/2024-14:00:24] [I] Streams: 1
[02/28/2024-14:00:24] [I] ExposeDMA: Disabled
[02/28/2024-14:00:24] [I] Data transfers: Enabled
[02/28/2024-14:00:24] [I] Spin-wait: Disabled
[02/28/2024-14:00:24] [I] Multithreading: Disabled
[02/28/2024-14:00:24] [I] CUDA Graph: Disabled
[02/28/2024-14:00:24] [I] Separate profiling: Disabled
[02/28/2024-14:00:24] [I] Time Deserialize: Disabled
[02/28/2024-14:00:24] [I] Time Refit: Disabled
[02/28/2024-14:00:24] [I] Skip inference: Disabled
[02/28/2024-14:00:24] [I] Inputs:
[02/28/2024-14:00:24] [I] === Reporting Options ===
[02/28/2024-14:00:24] [I] Verbose: Enabled
[02/28/2024-14:00:24] [I] Averages: 10 inferences
[02/28/2024-14:00:24] [I] Percentile: 99
[02/28/2024-14:00:24] [I] Dump refittable layers:Disabled
[02/28/2024-14:00:24] [I] Dump output: Disabled
[02/28/2024-14:00:24] [I] Profile: Disabled
[02/28/2024-14:00:24] [I] Export timing to JSON file:
[02/28/2024-14:00:24] [I] Export output to JSON file:
[02/28/2024-14:00:24] [I] Export profile to JSON file:
[02/28/2024-14:00:24] [I]
[02/28/2024-14:00:24] [I] === Device Information ===
[02/28/2024-14:00:24] [I] Selected Device: NVIDIA Tegra X1
[02/28/2024-14:00:24] [I] Compute Capability: 5.3
[02/28/2024-14:00:24] [I] SMs: 1
[02/28/2024-14:00:24] [I] Compute Clock Rate: 0.9216 GHz
[02/28/2024-14:00:24] [I] Device Global Memory: 3964 MiB
[02/28/2024-14:00:24] [I] Shared Memory per SM: 64 KiB
[02/28/2024-14:00:24] [I] Memory Bus Width: 64 bits (ECC disabled)
[02/28/2024-14:00:24] [I] Memory Clock Rate: 0.01275 GHz
[02/28/2024-14:00:24] [I]
[02/28/2024-14:00:24] [I] TensorRT version: 8001
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::GridAnchor_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::GridAnchorRect_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::NMS_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Reorg_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Region_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Clip_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::LReLU_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::PriorBox_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Normalize_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::ScatterND version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::RPROI_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::BatchedNMS_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::BatchedNMSDynamic_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::FlattenConcat_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::CropAndResize version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::DetectionLayer_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::EfficientNMS_ONNX_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::EfficientNMS_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Proposal version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::ProposalLayer_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::PyramidROIAlign_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::ResizeNearest_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::Split version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::SpecialSlice_TRT version 1
[02/28/2024-14:00:24] [V] [TRT] Registered plugin creator - ::InstanceNormalization_TRT version 1
[02/28/2024-14:00:25] [I] [TRT] [MemUsageChange] Init CUDA: CPU +203, GPU +0, now: CPU 221, GPU 3224 (MiB)
[02/28/2024-14:00:25] [I] Start parsing network model
[02/28/2024-14:00:25] [I] [TRT] ----------------------------------------------------------------
[02/28/2024-14:00:25] [I] [TRT] Input filename: /home/jetson/self_driving/vit_onnx.onnx
[02/28/2024-14:00:25] [I] [TRT] ONNX IR version: 0.0.8
[02/28/2024-14:00:25] [I] [TRT] Opset version: 15
[02/28/2024-14:00:25] [I] [TRT] Producer name: tf2onnx
[02/28/2024-14:00:25] [I] [TRT] Producer version: 1.16.1 15c810
[02/28/2024-14:00:25] [I] [TRT] Domain:
[02/28/2024-14:00:25] [I] [TRT] Model version: 0
[02/28/2024-14:00:25] [I] [TRT] Doc string:
[02/28/2024-14:00:25] [I] [TRT] ----------------------------------------------------------------
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::GridAnchor_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::GridAnchorRect_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::NMS_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Reorg_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Region_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Clip_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::LReLU_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::PriorBox_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Normalize_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::ScatterND version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::RPROI_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::BatchedNMS_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::BatchedNMSDynamic_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::FlattenConcat_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::CropAndResize version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::DetectionLayer_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::EfficientNMS_ONNX_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::EfficientNMS_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Proposal version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::ProposalLayer_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::PyramidROIAlign_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::ResizeNearest_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::Split version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::SpecialSlice_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Plugin creator already registered - ::InstanceNormalization_TRT version 1
[02/28/2024-14:00:26] [V] [TRT] Adding network input: conv2d_input with dtype: float32, dimensions: (-1, 240, 240, 3)
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: conv2d_input for ONNX tensor: conv2d_input
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: const_fold_opt__23
[02/28/2024-14:00:26] [W] [TRT] onnx2trt_utils.cpp:364: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/dense_1/MatMul/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/dense_1/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/dense/MatMul/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/dense/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/conv2d_1/Conv2D/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/conv2d/Conv2D/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Importing initializer: StatefulPartitionedCall/sequential/conv2d/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6 [Transpose]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: conv2d_input
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/BiasAdd__6 [Transpose] inputs: [conv2d_input → (-1, 240, 240, 3)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6 for ONNX node: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6:0 for ONNX tensor: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/BiasAdd__6 [Transpose] outputs: [StatefulPartitionedCall/sequential/conv2d/BiasAdd__6:0 → (-1, 3, 240, 240)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/conv2d/BiasAdd [Conv]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d/BiasAdd__6:0
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d/Conv2D/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/BiasAdd [Conv] inputs: [StatefulPartitionedCall/sequential/conv2d/BiasAdd__6:0 → (-1, 3, 240, 240)[FLOAT]], [StatefulPartitionedCall/sequential/conv2d/Conv2D/ReadVariableOp:0 → (32, 3, 3, 3)[FLOAT]], [StatefulPartitionedCall/sequential/conv2d/BiasAdd/ReadVariableOp:0 → (32)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Convolution input dimensions: (-1, 3, 240, 240)
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/conv2d/BiasAdd for ONNX node: StatefulPartitionedCall/sequential/conv2d/BiasAdd
[02/28/2024-14:00:26] [V] [TRT] Using kernel: (3, 3), strides: (1, 1), prepadding: (0, 0), postpadding: (0, 0), dilations: (1, 1), numOutputs: 32
[02/28/2024-14:00:26] [V] [TRT] Convolution output dimensions: (-1, 32, 238, 238)
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/conv2d/BiasAdd:0 for ONNX tensor: StatefulPartitionedCall/sequential/conv2d/BiasAdd:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/BiasAdd [Conv] outputs: [StatefulPartitionedCall/sequential/conv2d/BiasAdd:0 → (-1, 32, 238, 238)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/conv2d/Relu [Relu]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d/BiasAdd:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/Relu [Relu] inputs: [StatefulPartitionedCall/sequential/conv2d/BiasAdd:0 → (-1, 32, 238, 238)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/conv2d/Relu for ONNX node: StatefulPartitionedCall/sequential/conv2d/Relu
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/conv2d/Relu:0 for ONNX tensor: StatefulPartitionedCall/sequential/conv2d/Relu:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d/Relu [Relu] outputs: [StatefulPartitionedCall/sequential/conv2d/Relu:0 → (-1, 32, 238, 238)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool [MaxPool]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d/Relu:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d/MaxPool [MaxPool] inputs: [StatefulPartitionedCall/sequential/conv2d/Relu:0 → (-1, 32, 238, 238)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool for ONNX node: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool:0 for ONNX tensor: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d/MaxPool [MaxPool] outputs: [StatefulPartitionedCall/sequential/max_pooling2d/MaxPool:0 → (-1, 32, 119, 119)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd [Conv]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/max_pooling2d/MaxPool:0
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d_1/Conv2D/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd/ReadVariableOp:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d_1/BiasAdd [Conv] inputs: [StatefulPartitionedCall/sequential/max_pooling2d/MaxPool:0 → (-1, 32, 119, 119)[FLOAT]], [StatefulPartitionedCall/sequential/conv2d_1/Conv2D/ReadVariableOp:0 → (64, 32, 3, 3)[FLOAT]], [StatefulPartitionedCall/sequential/conv2d_1/BiasAdd/ReadVariableOp:0 → (64)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Convolution input dimensions: (-1, 32, 119, 119)
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd for ONNX node: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd
[02/28/2024-14:00:26] [V] [TRT] Using kernel: (3, 3), strides: (1, 1), prepadding: (0, 0), postpadding: (0, 0), dilations: (1, 1), numOutputs: 64
[02/28/2024-14:00:26] [V] [TRT] Convolution output dimensions: (-1, 64, 117, 117)
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd:0 for ONNX tensor: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d_1/BiasAdd [Conv] outputs: [StatefulPartitionedCall/sequential/conv2d_1/BiasAdd:0 → (-1, 64, 117, 117)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/conv2d_1/Relu [Relu]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d_1/BiasAdd:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d_1/Relu [Relu] inputs: [StatefulPartitionedCall/sequential/conv2d_1/BiasAdd:0 → (-1, 64, 117, 117)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/conv2d_1/Relu for ONNX node: StatefulPartitionedCall/sequential/conv2d_1/Relu
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/conv2d_1/Relu:0 for ONNX tensor: StatefulPartitionedCall/sequential/conv2d_1/Relu:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/conv2d_1/Relu [Relu] outputs: [StatefulPartitionedCall/sequential/conv2d_1/Relu:0 → (-1, 64, 117, 117)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool [MaxPool]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/conv2d_1/Relu:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool [MaxPool] inputs: [StatefulPartitionedCall/sequential/conv2d_1/Relu:0 → (-1, 64, 117, 117)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool for ONNX node: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool:0 for ONNX tensor: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool [MaxPool] outputs: [StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool:0 → (-1, 64, 58, 58)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20 [Transpose]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20 [Transpose] inputs: [StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool:0 → (-1, 64, 58, 58)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Registering layer: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20 for ONNX node: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20
[02/28/2024-14:00:26] [V] [TRT] Registering tensor: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0 for ONNX tensor: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20 [Transpose] outputs: [StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0 → (-1, 58, 58, 64)[FLOAT]],
[02/28/2024-14:00:26] [V] [TRT] Parsing node: StatefulPartitionedCall/sequential/flatten/Reshape [Reshape]
[02/28/2024-14:00:26] [V] [TRT] Searching for input: StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0
[02/28/2024-14:00:26] [V] [TRT] Searching for input: const_fold_opt__23
[02/28/2024-14:00:26] [V] [TRT] StatefulPartitionedCall/sequential/flatten/Reshape [Reshape] inputs: [StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0 → (-1, 58, 58, 64)[FLOAT]], [const_fold_opt__23 → (2)[INT32]],
[02/28/2024-14:00:26] [E] [TRT] ModelImporter.cpp:720: While parsing node number 8 [Reshape → “StatefulPartitionedCall/sequential/flatten/Reshape:0”]:
[02/28/2024-14:00:26] [E] [TRT] ModelImporter.cpp:721: — Begin node —
[02/28/2024-14:00:26] [E] [TRT] ModelImporter.cpp:722: input: “StatefulPartitionedCall/sequential/max_pooling2d_1/MaxPool__20:0”
input: “const_fold_opt__23”
output: “StatefulPartitionedCall/sequential/flatten/Reshape:0”
name: “StatefulPartitionedCall/sequential/flatten/Reshape”
op_type: “Reshape”

[02/28/2024-14:00:26] [E] [TRT] ModelImporter.cpp:723: — End node —
[02/28/2024-14:00:26] [E] [TRT] ModelImporter.cpp:726: ERROR: ModelImporter.cpp:162 In function parseGraph:
[6] Invalid Node - StatefulPartitionedCall/sequential/flatten/Reshape
Attribute not found: allowzero
[02/28/2024-14:00:26] [E] Failed to parse onnx file
[02/28/2024-14:00:26] [I] Finish parsing network model
[02/28/2024-14:00:26] [E] Parsing model failed
[02/28/2024-14:00:26] [E] Engine creation failed
[02/28/2024-14:00:26] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8001] # /usr/src/tensorrt/bin/trtexec --onnx=/home/jetson/self_driving/vit_onnx.onnx --shapes=‘input_1:0’:1x240x240x3 --saveEngine=/home/jetson/self_driving/engine.trt --verbose --explicitBatch

Dear @palmpalm2645,
May I know the ONNX opset version? Also, could you share the ONNX model file to reproduce the issue.

ONNX opset version: 11
here is the link of ONNX model: vit_onnx.onnx - Google Drive

Dear @palmpalm2645,
Could you check converting to oppset 13 as mentioned in Reddit - Dive into anything

That fixed the problem, thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.