The `fc_gru_fuse_pass` breaks accuracy in C-API CRNN-CTC inference.
Created by: wojtuss
The fc_gru_fuse_pass
breaks accuracy when running CRNN-CTC inference using the C-API.
The application https://github.com/wojtuss/models/tree/wojtuss/capi-ocr-recognition/fluid/PaddleCV/ocr_recognition/capi runs inference using the CRNN-CTC trained model https://github.com/wojtuss/models/blob/wojtuss/capi-ocr-recognition/fluid/PaddleCV/ocr_recognition/models/CRNN-CTC_model.tar.gz (with weights from Baidu, with EditDistance evaluator added) on the standard dataset.
With the fc_gru_fuse_pass
disabled in infer_ocr_recognition.cc:233
the accuracy we get from the app is equal to the accuracy we get using python eval.py
script: avg distance = 0.09206844, avg seq error = 0.2425.
With the fc_gru_fuse_pass
enabled, the accuracy gets lost: avg seq error = 1.0000.
The script https://github.com/wojtuss/models/blob/wojtuss/capi-ocr-recognition/fluid/PaddleCV/ocr_recognition/capi/infer_ocr_with_accuracy.sh provides an example of how to run the application.