Conversion error of Mask RCNN ONNX model for different types weights

Hi,

We tried the polygraphy tool, trtexec, and faced the following error. It looks like there is a problem with the model input.

polygraphy surgeon sanitize maskrcnn_modified.onnx --fold-constants --output model_folded.onnx
[05/30/2023-06:15:14] [V] [TRT] Registering layer: /roi_heads/Reshape for ONNX node: /roi_heads/Reshape
[05/30/2023-06:15:14] [E] Error[4]: [shapeContext.cpp::operator()::3602] Error Code 4: Shape Error (reshape wildcard -1 has infinite number of solutions or no solution. Reshaping [0,8] to [0,-1].)
[05/30/2023-06:15:14] [E] [TRT] ModelImporter.cpp:771: While parsing node number 633 [Reshape -> "/roi_heads/Reshape_output_0"]:
[05/30/2023-06:15:14] [E] [TRT] ModelImporter.cpp:772: --- Begin node ---
[05/30/2023-06:15:14] [E] [TRT] ModelImporter.cpp:773: input: "/roi_heads/box_predictor/bbox_pred/Gemm_output_0"
input: "/roi_heads/Concat_output_0"
output: "/roi_heads/Reshape_output_0"
name: "/roi_heads/Reshape"
op_type: "Reshape"
attribute {
  name: "allowzero"
  i: 0
  type: INT
}

[05/30/2023-06:15:14] [E] [TRT] ModelImporter.cpp:774: --- End node ---
[05/30/2023-06:15:14] [E] [TRT] ModelImporter.cpp:777: ERROR: ModelImporter.cpp:195 In function parseGraph:
[6] Invalid Node - /roi_heads/Reshape
[shapeContext.cpp::operator()::3602] Error Code 4: Shape Error (reshape wildcard -1 has infinite number of solutions or no solution. Reshaping [0,8] to [0,-1].)
[05/30/2023-06:15:14] [E] Failed to parse onnx file
[05/30/2023-06:15:14] [I] Finished parsing network model. Parse time: 0.473263
[05/30/2023-06:15:14] [E] Parsing model failed
[05/30/2023-06:15:14] [E] Failed to create engine from model or file.
[05/30/2023-06:15:14] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8601] # trtexec --onnx=model_folded.onnx --verbose --workspace=20000

Please refer to the similar issues below.

Thank you.