Skip to content

Commit 2caf549

Browse files
Port run_sequence_model to TF2
This patch ports the run_sequence_model binary to TF2. Minimal changes are needed given that all the underlying functionality has already been ported. Pull Request: google#305
1 parent f11fce3 commit 2caf549

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

gematria/sequence/python/run_sequence_model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from gematria.model.python import token_model_flags
2929
from gematria.sequence.python import sequence_model_hlstm
3030
from gematria.utils.python import flag_utils
31-
import tensorflow.compat.v1 as tf
31+
import tensorflow as tf
3232

3333
_OutOfVocabularyTokenBehavior = oov_token_behavior.OutOfVocabularyTokenBehavior
3434

@@ -154,7 +154,6 @@ def main(argv: Sequence[str]) -> None:
154154

155155

156156
if __name__ == '__main__':
157-
tf.disable_v2_behavior()
158157
token_model_flags.mark_token_flags_as_required()
159158
token_model_flags.set_default_oov_replacement_token(tokens.UNKNOWN)
160159
app.run(main)

0 commit comments

Comments
 (0)