Skip to content

Commit f3a50e7

Browse files
authored
Deprecate MultiHeadAttention (#2112)
1 parent 75ce434 commit f3a50e7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tensorflow_addons/layers/multihead_attention.py

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# =============================================================================
1515

1616
import typing
17+
import warnings
1718

1819
import tensorflow as tf
1920

@@ -100,6 +101,12 @@ def __init__(
100101
bias_constraint: typing.Union[str, typing.Callable] = None,
101102
**kwargs
102103
):
104+
warnings.warn(
105+
"`MultiHeadAttention` will be deprecated in Addons 0.13. "
106+
"Please use `tf.keras.layers.MultiHeadAttention` instead.",
107+
DeprecationWarning,
108+
)
109+
103110
super().__init__(**kwargs)
104111

105112
if output_size is not None and output_size < 1:

0 commit comments

Comments
 (0)