Commit 97e36fc6 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Set zero_output_for_mask in tf.keras.layers.Bidirectional only when return_sequences=True.

Previously, Bidirectional would always force zero_output_for_mask=True. However, this made it difficult to get just the last output from the layer when using masked sequences - if return_sequences=False, the last output for the forward RNN would be zeros.

PiperOrigin-RevId: 236009388
parent 4728deaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment