Skip to content

Commit a6e4493

Browse files
saberkuntensorflower-gardener
authored andcommitted
Nit: allow use runtime shape for hub module without explicit set_shape.
PiperOrigin-RevId: 288423138
1 parent 1e1333f commit a6e4493

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

official/nlp/bert_models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ def call(self, inputs):
256256
"""Implements call() for the layer."""
257257
sequence_output = inputs
258258

259-
input_shape = sequence_output.shape.as_list()
259+
input_shape = tf_utils.get_shape_list(
260+
sequence_output, name='sequence_output_tensor')
260261
sequence_length = input_shape[1]
261262
num_hidden_units = input_shape[2]
262263

0 commit comments

Comments
 (0)