[01/11/2023-07:49:49] [E] [TRT] 2: [convolutionBuilder.cpp::createConvolution::149] Error Code 2: Internal Error (Assertion isOpConsistent(convolution.get()) failed. Cask convolution isconsitent check failed.)
[01/11/2023-07:49:49] [E] [TRT] 2: [builder.cpp::buildSerializedNetwork::619] Error Code 2: Internal Error (Assertion engine != nullptr failed. )
run.sh: line 6: 4952 Segmentation fault (core dumped) ./run
解决方案:
重新设置动态shape
// 报错的动态shape
vector<int> MIN_DIMS_ = {1, 3, 20, 20};
vector<int> OPT_DIMS_ = {1, 3, 512, 512};
vector<int> MAX_DIMS_ = {1, 3, 640, 640};
// 修改后的动态shape
vector<int> MIN_DIMS_ = {1, 3, 1, 1};
vector<int> OPT_DIMS_ = {1, 3, 512, 512};
vector<int> MAX_DIMS_ = {1, 3, 640, 640};