"docs/en/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "1842ab520e7116d9bf2ebf6468c74caf47bfbaca"
Commit 4ef1cbf3 authored by Chen Chen's avatar Chen Chen Committed by A. Unique TensorFlower
Browse files

internal change

PiperOrigin-RevId: 334829363
parent 05b6ea2d
......@@ -81,8 +81,7 @@ class MaskedLM(tf.keras.layers.Layer):
lm_data = self.layer_norm(lm_data)
lm_data = tf.matmul(lm_data, self.embedding_table, transpose_b=True)
logits = tf.nn.bias_add(lm_data, self.bias)
masked_positions_length = masked_positions.shape[1] or tf.shape(
masked_positions_length = masked_positions.shape.as_list()[1] or tf.shape(
masked_positions)[1]
logits = tf.reshape(logits,
[-1, masked_positions_length, self._vocab_size])
......
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