This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
print('tensorflow version ',tf.__version__) | |
##tensorflow version = 2.2 (also works with tensorflow 2.1) | |
##This is a simple sample code to use table lookup in tensorflow using 2 different options | |
##1st method is a file backed table lookup & 2nd one is based on an in memory list | |
vocab_path='vocab_test.txt' | |
model_dir_lookup='model/lookup' |