Closed wojtuss closed 5 years ago
Why inference need warpctc_op
?
Actually, it is for evaluation and accuracy check. This is how python scripts execute the CRNN-CTC evaluation.
@luotao1 , I have just found out that I really do not need the warpctc
operator.
Thanks!
When running CRNN-CTC inference using C-API and
AnalysisPredictor
, I have to declare the network inputs (pixel
andlabel
) asPaddleTensor
s of type eitherPaddleDType::FLOAT
orPaddleDType::INT64
. So I declare the labels asINT64
. However, when the execution comes to thewarpctc
operator https://github.com/PaddlePaddle/Paddle/blob/add98c9e7de55c72e9cf79300ba65e50934e6178/paddle/fluid/operators/warpctc_op.h#L202 and then to the check https://github.com/PaddlePaddle/Paddle/blob/add98c9e7de55c72e9cf79300ba65e50934e6178/paddle/fluid/framework/tensor_impl.h#L41 it fails, as it expectsint
and notlong int
(INT64
).Can I do anything to avoid this problem or it requires a fix to the
warpctc
operator?