Fix issue with Luong attention when scale=True and dtype of tf.float16/tf.float64 (#18106)
* Fix issue with Luong attention when scale=True and dtype=tf.float16/tf.float64 This fix tries to address the issue raised in 18099 where Luong throws a ValueError when scale=True and dtype is not tf.float32. This fix addresses the issue with the additional test case added. This fix fixes 18099. Signed-off-by:Yong Tang <yong.tang.github@outlook.com> * Fix pylint issue Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add test case for Luong attention with scale=True and dtype=float16/float64 Signed-off-by:
Yong Tang <yong.tang.github@outlook.com> * Add assertEqual to confirm the dtypes of the output Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment