Commit 6e5c26a2 authored by Scott Zhu's avatar Scott Zhu Committed by TensorFlower Gardener
Browse files

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
parent 368861ae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment