Add new flag zero_output_for_mask to RNN.
Current RNN layer will use previous timestep output as the output if the step is masked. It is useful for certain case, eg propagate the output to final timestep when data is right padded, and user only want the output for final timestep. However, if user cares about output for all timestep, then use zero filed output is more reasonable when input is masked. Since this is change of behavior, added a new flag in RNN as well as backend.rnn(). PiperOrigin-RevId: 221514766
Loading
Please sign in to comment