背景
使用ocr_system調用微調模型時發現部分圖片在設置enable_mkldnn=True后出現識別精度下降問題
環境:
paddle==2.5.1
paddlehub==2.3.1
python==3.8.6
解決方案
tools\infer\utility.py文件中 line 269行左右,
在代碼config.delete_pass("matmul_transpose_reshape_fuse_pass")
下面添加兩行代碼:
config.delete_pass("fc_mkldnn_pass")
config.delete_pass("fc_act_mkldnn_fuse_pass
參考:
https://github.com/PaddlePaddle/PaddleOCR/issues/10497
官方說會在后續版本中處理,但是截止發文時間點,paddle==2.5.2版本中仍無法解決該問題