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

Add AttentionMechanismV2 that follows Keras API style.

1. Adding new base class for AttentionMechanism that use keras.layer as parent.
2. All the new AttentionMechanismV2 will accept tensors from call() instead of
   as __init__ parameters.
3. memory_length has been update to memory_mask in v2 which is more align with
the keras API.
4. _luong_score() and _bahdanau_score() has been updated to not create variable
by itself. All the variable are now passed in as parameters.
5. All the existing unit tests are still passing. I haven't add new unit test
for v2 class yet, will add them once I update the AttentionWrapper to v2.

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