InferShape cannot obtain LoD information.
Created by: lcy-seso
The current InferShape
interface cannot obtain the LoD information(the sequence information). This makes the output dimension of the CRF operator cannot be correctly set in the InferShape
function.
Because the CRF operator takes sequences as its inputs and outputs a non-sequence as the result. How many sequences are there in the input is required (the LoD information) to determine the output dimension.
I have to set an arbitrarily wrong dimension to the output in InferShape
and then resize the right dimension in Compute
. This seems very tricky.
Have we already determined that the LoD will not pass to InferShape
in operator's kernel?
@jacquesqiao @reyoung