Commit 3dae7a77 authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

Fix typo last_enocder_output -> last_encoder_output

PiperOrigin-RevId: 343410095
parent babf9ad8
...@@ -169,11 +169,11 @@ class BertEncoder(tf.keras.Model): ...@@ -169,11 +169,11 @@ class BertEncoder(tf.keras.Model):
data = layer([data, attention_mask]) data = layer([data, attention_mask])
encoder_outputs.append(data) encoder_outputs.append(data)
last_enocder_output = encoder_outputs[-1] last_encoder_output = encoder_outputs[-1]
# Applying a tf.slice op (through subscript notation) to a Keras tensor # Applying a tf.slice op (through subscript notation) to a Keras tensor
# like this will create a SliceOpLambda layer. This is better than a Lambda # like this will create a SliceOpLambda layer. This is better than a Lambda
# layer with Python code, because that is fundamentally less portable. # layer with Python code, because that is fundamentally less portable.
first_token_tensor = last_enocder_output[:, 0, :] first_token_tensor = last_encoder_output[:, 0, :]
pooler_layer = tf.keras.layers.Dense( pooler_layer = tf.keras.layers.Dense(
units=hidden_size, units=hidden_size,
activation='tanh', activation='tanh',
......
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