onnx converted to trt problem
See original GitHub issuewhen i converted onnx model to trt, always getting a reshape error, error are as follows: 10_27_16_38_[TRT: ERR][graphShapeAnalyzer.cpp::nvinfer1::builder::`anonymous-namespace’::ShapeNodeRemover::analyzeShapes::1285] Error Code 4: Miscellaneous (IShuffleLayer Reshape_170: reshape changes volume. Reshaping [14763] to [1].) 10_27_16_38_[TRT: ERR]ModelImporter.cpp:773: While parsing node number 170 [Reshape -> “489”]: 10_27_16_38_[TRT: ERR]ModelImporter.cpp:774: — Begin node — 10_27_16_38_[TRT: ERR]ModelImporter.cpp:775: input: “487” input: “488” output: “489” name: “Reshape_170” op_type: “Reshape”
10_27_16_38_[TRT: ERR]ModelImporter.cpp:776: — End node — 10_27_16_38_[TRT: ERR]ModelImporter.cpp:779: ERROR: ModelImporter.cpp:179 In function parseGraph: [6] Invalid Node - Reshape_170 [graphShapeAnalyzer.cpp::nvinfer1::builder::`anonymous-namespace’::ShapeNodeRemover::analyzeShapes::1285] Error Code 4: Miscellaneous (IShuffleLayer Reshape_170: reshape changes volume. Reshaping [14763] to [1].)
when i remove anomaly_score item in output ,such as: anomaly_map = self.anomaly_map_generator(patch_scores) output = (anomaly_map)
and the error changed, 10_27_15_11_[TRT: ERR][shuffleNode.cpp::nvinfer1::builder::ShuffleNode::symbolicExecute::387] Error Code 4: Internal Error (Reshape_183: IShuffleLayer applied to shape tensor must have 0 or 1 reshape dimensions: dimensions were [-1,2]) 10_27_15_11_[TRT: ERR]ModelImporter.cpp:773: While parsing node number 193 [Pad -> “521”]: 10_27_15_11_[TRT: ERR]ModelImporter.cpp:774: — Begin node — 10_27_15_11_[TRT: ERR]ModelImporter.cpp:775: input: “486” input: “520” output: “521” name: “Pad_193” op_type: “Pad” attribute { name: “mode” s: “reflect” type: STRING }
10_27_15_11_[TRT: ERR]ModelImporter.cpp:776: — End node — 10_27_15_11_[TRT: ERR]ModelImporter.cpp:779: ERROR: ModelImporter.cpp:179 In function parseGraph: [6] Invalid Node - Pad_193 [shuffleNode.cpp::nvinfer1::builder::ShuffleNode::symbolicExecute::387] Error Code 4: Internal Error (Reshape_183: IShuffleLayer applied to shape tensor must have 0 or 1 reshape dimensions: dimensions were [-1,2])
finally, i find it’s problem always appear inBelow the ConstantOfShape node。
what should i do, for this problem?
Issue Analytics
- State:
- Created a year ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
Hi,Can you explain how to solve this problem,Please show the code, thank you!
@montensorrt, for a future reference, can you elaborate how exactly you fixed the problem? It could be useful for other users. We might also potentially create a PR to fix it.