Переглянути джерело

Circumvent paddle inference bug (#3490)

Lin Manhui 8 місяців тому
батько
коміт
8412aa82cb
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      paddlex/inference/models/common/static_infer.py

+ 2 - 0
paddlex/inference/models/common/static_infer.py

@@ -149,6 +149,8 @@ def _convert_trt(
     def _get_input_names(model_file, params_file):
         # HACK
         config = lazy_paddle.inference.Config(str(model_file), str(params_file))
+        # NOTE: Disable oneDNN to circumvent a bug in Paddle Inference
+        config.disable_mkldnn()
         config.disable_glog_info()
         predictor = lazy_paddle.inference.create_predictor(config)
         return predictor.get_input_names()