Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated attention_ocr model to be compatible with TensorFlow 2.x. #10952

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 8, 2023

  1. Updated attention_ocr model to be compatible with TensorFlow 2.x.

    Updated references to removed `tf.contrib` packages:
    - `tf.contrib.slim` is now distributed as a separate PIP package tf-slim.
    - `tf.contrib.legacy_seq2seq` is no longer available. The classes need by this model have been copied here.
    - `tf.contrib.lookup.index_to_string_table_from_tensor` has been replaced with `tf.lookup.StaticHashTable`.
    - `tf.contrib.layers.one_hot_encoding` has been replaced with `tf.one_hot`.
    
    Added the FSNS list of URLs which used to be under `research/street` (that model was removed by PR tensorflow#8934).
    This update makes the `research/attention_ocr` model compatible with TensorFlow 2, but it is not TF2 native, since it uses compat.v1 layers. Checkpoints trained with TF1 can still be loaded with the latest version, but results my be slightly different due to implementation changes with respect to old contrib layers.
    
    BUG: The `test_moving_variables_properly_loaded_from_a_checkpoint` in `demo_inference.py` no longer passes (probably to internal changes in SLIM). We need retrain the model and provide an updated checkpoint that makes this test pass.
    xavigibert committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    dbe3a3b View commit details
    Browse the repository at this point in the history