Created by: tpatejko
This PR fixes a problem in RNN-CTC where edit distance was calculated incorrectly.
In PaddlePaddle, edit distance is calculated by accumulating partial distance values to total distance. The already accumulated value of total distance was skipped and overwritten when in_place
value was set to true
.
Buggy situation happened because MKLDNN sum
primitive does not support any in-place computation. In MKLDNN sum
, content of the output is ignored and it is always initialized with the content of the first element on the list of sources. When in_place
attribute was true, value of partially calculated total distance was ignored and it was overwritten.