Using Tensorflow Data Services makes sequence modelling much easier
I have switched my sentiment model to use the very nice features of TFDS for sequence preprocessing. So instead of writing my own vocab, word_to_index dictionary, encoding and padding my text, I can just use the canned ones in tfds.
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
As always the code is in the git repo.
Comments
Post a Comment