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

Popular posts from this blog

Using curl scriptlets from a single file in VS Code

Recreating python feature extraction code in JavaScript

Sentiment Analysis based on IMDB Movie Review dataset