Commit 7ae450a1 authored by Zhenyu Tan's avatar Zhenyu Tan Committed by A. Unique TensorFlower
Browse files

Have BertEncoder ingest keras_nlp.SelfAttentionMask

PiperOrigin-RevId: 330623395
parent 2f737e1e
......@@ -168,7 +168,7 @@ class BertEncoder(tf.keras.Model):
self._transformer_layers = []
data = embeddings
attention_mask = layers.SelfAttentionMask()([data, mask])
attention_mask = keras_nlp.SelfAttentionMask()(data, mask)
encoder_outputs = []
for i in range(num_layers):
if i == num_layers - 1 and output_range is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment