Skip to content

Commit

Permalink
Add comments about workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
nikelite committed Nov 27, 2024
1 parent 99c5f2a commit 157ff40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tfx/examples/imdb/imdb_utils_native_keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def _build_keras_model() -> keras.Model:
name=_transformed_name(_FEATURE_KEY)
)(input_layer)

# Note: With dropout=_DROPOUT_RATE,
# TF 1.16 cannot save the model with tf.saved_model.save().
# dropout=0 is a workaround currently, need to find a solution.
lstm_layer = keras.layers.Bidirectional(
keras.layers.LSTM(_LSTM_UNITS, dropout=0)
)(embedding_layer)
Expand Down

0 comments on commit 157ff40

Please sign in to comment.