diff --git a/deploy/cpp_infer/src/ocr_rec.cpp b/deploy/cpp_infer/src/ocr_rec.cpp index b64dcea5ae2a68485296c02cdb7689c60ea504f8..3739a66ad802fd108df16bbbbe8c8695963b7693 100644 --- a/deploy/cpp_infer/src/ocr_rec.cpp +++ b/deploy/cpp_infer/src/ocr_rec.cpp @@ -112,12 +112,16 @@ void CRNNRecognizer::LoadModel(const std::string &model_dir) { 1 << 20, 10, 3, precision, false, false); + std::map> min_input_shape = { - {"x", {1, 3, 32, 10}}}; + {"x", {1, 3, 32, 10}}, + {"lstm_0.tmp_0", {10, 1, 96}}}; std::map> max_input_shape = { - {"x", {1, 3, 32, 2000}}}; + {"x", {1, 3, 32, 2000}}, + {"lstm_0.tmp_0", {1000, 1, 96}}}; std::map> opt_input_shape = { - {"x", {1, 3, 32, 320}}}; + {"x", {1, 3, 32, 320}}, + {"lstm_0.tmp_0", {25, 1, 96}}}; config.SetTRTDynamicShapeInfo(min_input_shape, max_input_shape, opt_input_shape); @@ -139,7 +143,7 @@ void CRNNRecognizer::LoadModel(const std::string &model_dir) { config.SwitchIrOptim(true); config.EnableMemoryOptim(); - config.DisableGlogInfo(); +// config.DisableGlogInfo(); this->predictor_ = CreatePredictor(config); }