tf.keras in @TensorFlow 2.1 adds TextVectorization layer to flexibly map raw strings to tokens/word pieces/ngrams/vocab. An image is just a matrix of numbers but text always needs extra work and it‘s cleaner having preprocessing inside the model
https://github.com/tensorflow/tensorflow/releases/tag/v2.1.0 …
I've created a tip explaning how to use this new @TensorFlow layer, check it out herehttps://dzlab.github.io/dltips/en/tensorflow/textvectorization-preprocessing/ …