TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

Can not convert efficientdet-d7 from AutoML model to onnx model

Open HeXCZ1028 opened this issue 3 years ago • 3 comments

Description

when I convert fficientdet-d7x from AutoML Models as https://github.com/NVIDIA/TensorRT/tree/main/samples/python/efficientdet, I get "INVALID_GRAPH : This is an invalid model. Error in Node:strided_slice_1 : Node (strided_slice_1) has input size 0 not in range [min=3, max=5]" message.

Environment

TensorRT Version: 8.03 NVIDIA GPU: NVIDIA Driver Version: 11.4 CUDA Version: 11.4 CUDNN Version: 8.2.4 Operating System: Ubuntu 20.04 Python Version (if applicable): 3.8 Tensorflow Version (if applicable): 2.9.1 PyTorch Version (if applicable): Baremetal or Container (if so, version): TensorRT release 21.09 (link :https://docs.nvidia.com/deeplearning/tensorrt/container-release-notes/rel_21-09.html#rel_21-09)

Relevant Files

onnx 1.8.1 onnx-graphsurgeon 0.3.20 onnxruntime 1.8.0

Steps To Reproduce

Following https://github.com/NVIDIA/TensorRT/tree/main/samples/python/efficientdet , I want to convert efficientdet-d7 from AutoML model to onnx model. When I run command python create_onnx.py --input_shape '1,3,1536,1536' --saved_model /workspace/efficientdet_model/saved_model/efficientdet-d7 --onnx /workspace/efficientdet_model/onnx_model/efficientdet-d7.onnx ,error message[ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:StatefulPartitionedCall/Cast : Node (StatefulPartitionedCall/Cast) has input size 0 not in range [min=1, max=1]`happen.

I find it is convertered to onnx ,but I am wonder whether those errors influence result?

--> Below is full error messages 2022-08-31 12:04:51.554500: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2022-08-31 12:04:52.628013: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 WARNING:absl:Importing a function (__inference_EfficientDet-D6-D7_layer_call_and_return_conditional_losses_233604) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference_bifpn_layer_call_and_return_conditional_losses_169633) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference___call___54382) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference_EfficientDet-D6-D7_layer_call_and_return_conditional_losses_218766) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference_EfficientDet-D6-D7_layer_call_and_return_conditional_losses_209972) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference_bifpn_layer_call_and_return_conditional_losses_166209) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. WARNING:absl:Importing a function (__inference_EfficientDet-D6-D7_layer_call_and_return_conditional_losses_242398) with ops with unsaved custom gradients. Will likely fail if a gradient is requested. INFO:tf2onnx.tf_loader:Signatures found in model: [serving_default]. 2022-08-31 12:06:16.024448: I tensorflow/core/grappler/devices.cc:66] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 1 2022-08-31 12:06:16.024616: I tensorflow/core/grappler/clusters/single_machine.cc:358] Starting new session 2022-08-31 12:06:16.027107: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 2022-08-31 12:06:49.644816: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 WARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/tf2onnx/tf_loader.py:529: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version. Instructions for updating: Use tf.compat.v1.graph_util.extract_sub_graphWARNING:tensorflow:From /usr/local/lib/python3.8/dist-packages/tf2onnx/tf_loader.py:529: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version. Instructions for updating: Usetf.compat.v1.graph_util.extract_sub_graph` 2022-08-31 12:06:59.000395: I tensorflow/core/grappler/devices.cc:66] Number of eligible GPUs (core count >= 8, compute capability >= 0.0): 1 2022-08-31 12:06:59.000554: I tensorflow/core/grappler/clusters/single_machine.cc:358] Starting new session 2022-08-31 12:06:59.003123: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 INFO:EfficientDetGraphSurgeon:Loaded saved model from /workspace/efficientdet_model/saved_model/efficientdet-d7 2022-08-31 12:07:09.038840: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 INFO:tf2onnx.tfonnx:Using tensorflow=2.9.1, onnx=1.8.1, tf2onnx=1.8.1/4e49f3 INFO:tf2onnx.tfonnx:Using opset <onnx, 11> 2022-08-31 12:07:20.157759: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute ......

2022-08-31 12:07:20.639473: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 2022-08-31 12:07:20.699988: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 2022-08-31 12:07:20.703930: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 2022-08-31 12:07:20.708620: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1601 MB memory: -> device: 0, name: NVIDIA GeForce GTX TITAN X, pci bus id: 0000:03:00.0, compute capability: 5.2 INFO:tf2onnx.tf_utils:Computed 5 values for constant folding INFO:tf2onnx.tf_utils:Computed 0 values for constant folding INFO:tf2onnx.tf_utils:Computed 0 values for constant folding INFO:tf2onnx.tfonnx:folding node using tf type=ExpandDims, name=StatefulPartitionedCall/Postprocessor/ExpandDims_2 INFO:tf2onnx.tfonnx:folding node using tf type=ConcatV2, name=StatefulPartitionedCall/MultiscaleGridAnchorGenerator/GridAnchorGenerator_1/concat INFO:tf2onnx.tfonnx:folding node using tf type=ConcatV2, name=StatefulPartitionedCall/MultiscaleGridAnchorGenerator/GridAnchorGenerator/concat INFO:tf2onnx.tfonnx:folding node using tf type=Select, name=StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/PadOrClipBoxList/Select_1 INFO:tf2onnx.tfonnx:folding node using tf type=Select, name=StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/PadOrClipBoxList/Select_8 INFO:tf2onnx.tfonnx:folding node type=Range, name=StatefulPartitionedCall/Postprocessor/range WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stem_bn/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. ... WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_2/BatchNorm/feature_2/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_3/BatchNorm/feature_2/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_4/BatchNorm/feature_2/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/EfficientDet-D6-D7/bifpn/node_64/8_up_lvl_6/post_combine/batchnorm/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_0/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_1/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_2/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_3/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_4/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_0/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_1/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_2/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_3/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_4/BatchNorm/feature_3/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/EfficientDet-D6-D7/bifpn/node_65/8_up_lvl_7/post_combine/batchnorm/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_0/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_1/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_2/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_3/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/ClassPredictionTower/conv2d_4/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_0/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_1/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_2/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_3/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. WARNING:tf2onnx.onnx_opset.nn:Node StatefulPartitionedCall/WeightSharedConvolutionalBoxPredictor/BoxPredictionTower/conv2d_4/BatchNorm/feature_4/FusedBatchNormV3 of type FusedBatchNormV3 has is_training set to true, which is not supperted. Please re-save the model with training set to false. INFO:tf2onnx.optimizer:Optimizing ONNX model INFO:tf2onnx.optimizer:After optimization: BatchNormalization -124 (247->123), Cast -731 (1351->620), Concat -6 (281->275), Const -3375 (4781->1406), Identity -151 (151->0), Mul -2 (516->514), ReduceSum -90 (91->1), Reshape -49 (368->319), Shape -92 (201->109), Slice -9 (309->300), Split -1 (20->19), Squeeze -11 (246->235), Sub -94 (210->116), Transpose -1380 (1512->132), Unsqueeze -178 (383->205) INFO:EfficientDetGraphSurgeon:TF2ONNX graph created successfully INFO:EfficientDetGraphSurgeon:Graph was detected as TFOD INFO:EfficientDetGraphSurgeon:Shape inference could not be performed at this time: [ShapeInferenceError] (op_type:Expand, node name: StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/zeros_1): [TypeInferenceError] Inferred elem type differs from existing elem type: (INT32) vs (FLOAT) INFO:EfficientDetGraphSurgeon:ONNX graph input shape: [1, 3, 1536, 1536] [NCHW format detected] INFO:EfficientDetGraphSurgeon:Found Conv node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stem_conv2d/Conv2D' as stem entry INFO:EfficientDetGraphSurgeon:Shape inference could not be performed at this time: [ShapeInferenceError] (op_type:Expand, node name: StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/zeros_1): [TypeInferenceError] Inferred elem type differs from existing elem type: (INT32) vs (FLOAT) [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] 'Shape tensor cast elision' routine failed with: list index out of range [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:StatefulPartitionedCall/Cast : Node (StatefulPartitionedCall/Cast) has input size 0 not in range [min=1, max=1]. INFO:EfficientDetGraphSurgeon:Shape inference could not be performed at this time: [ShapeInferenceError] (op_type:Expand, node name: StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/zeros_1): [TypeInferenceError] Inferred elem type differs from existing elem type: (INT32) vs (FLOAT) [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] 'Shape tensor cast elision' routine failed with: list index out of range [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:StatefulPartitionedCall/Cast : Node (StatefulPartitionedCall/Cast) has input size 0 not in range [min=1, max=1]. INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_0/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_0/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_0/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_3/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_4/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_1/block_5/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_3/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_4/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_2/block_5/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_3/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_4/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_5/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_6/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_3/block_7/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_3/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_4/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_5/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_6/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_4/block_7/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_1/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_2/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_3/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_4/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_5/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_6/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_7/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_8/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_9/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_5/block_10/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Optimized subgraph around ReduceMean node 'StatefulPartitionedCall/EfficientDet-D6-D7/functional_1/stack_6/block_0/se_squeeze/Mean' INFO:EfficientDetGraphSurgeon:Shape inference could not be performed at this time: [ShapeInferenceError] (op_type:Expand, node name: StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/zeros_1): [TypeInferenceError] Inferred elem type differs from existing elem type: (INT32) vs (FLOAT) [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] 'Shape tensor cast elision' routine failed with: list index out of range [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:StatefulPartitionedCall/Cast : Node (StatefulPartitionedCall/Cast) has input size 0 not in range [min=1, max=1]. INFO:EfficientDetGraphSurgeon:Shape inference could not be performed at this time: [ShapeInferenceError] (op_type:Expand, node name: StatefulPartitionedCall/Postprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression/zeros_1): [TypeInferenceError] Inferred elem type differs from existing elem type: (INT32) vs (FLOAT) [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] 'Shape tensor cast elision' routine failed with: list index out of range [W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored [W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was: [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:StatefulPartitionedCall/Cast : Node (StatefulPartitionedCall/Cast) has input size 0 not in range [min=1, max=1]. INFO:EfficientDetGraphSurgeon:Found Concat node 'StatefulPartitionedCall/concat_1' as the tip of /WeightSharedConvolutionalClassHead/ INFO:EfficientDetGraphSurgeon:Found Concat node 'StatefulPartitionedCall/concat' as the tip of /WeightSharedConvolutionalBoxHead/ INFO:EfficientDetGraphSurgeon:Created NMS plugin 'EfficientNMS_TRT' with attributes: {'plugin_version': '1', 'background_class': -1, 'max_output_boxes': 100, 'score_threshold': 0.01, 'iou_threshold': 0.5, 'score_activation': True, 'box_coding': 1} Warning: Unsupported operator EfficientNMS_TRT. No schema registered for this operator. Warning: Unsupported operator EfficientNMS_TRT. No schema registered for this operator. INFO:EfficientDetGraphSurgeon:Saved ONNX model to /workspace/efficientdet_model/onnx_model/efficientdet-d7.onnx`

HeXCZ1028 avatar Aug 31 '22 12:08 HeXCZ1028

when I convert efficient-d7x, error message is [ONNXRuntimeError] : 10 : INVALID_GRAPH : This is an invalid model. Error in Node:strided_slice_1 : Node (strided_slice_1) has input size 0 not in range [min=3, max=5]. and onnx model can not be generated

I have tried change onnx opset from 11 to others(13,10), similar errors also happen

HeXCZ1028 avatar Aug 31 '22 12:08 HeXCZ1028

@azhurkevich ^ ^

zerollzeng avatar Aug 31 '22 13:08 zerollzeng

@zerollzeng I did not author this converter, so will not be of use especially considering it is an AutoML model.

azhurkevich avatar Sep 10 '22 17:09 azhurkevich

I will close inactive issues for more than 3 week per our policy, thanks all!

ttyio avatar May 13 '24 16:05 ttyio