Shape of the integer sequences in TextVectorization layer


How the shape of integer sequences is determined in TextVectorization preprocessing layer? and how to handle the shape?

Can you post the code that got you to this output?

inp_text_preprocessor = ???

inp = ???

I think mostly you’re just looking for the “output_sequence_length” argument.

https://www.tensorflow.org/api_docs/python/tf/keras/layers/TextVectorization

If none, it’s padded to the longest sequence, otherwise it’s padded or truncated to fit.

1 Like

input is a list of Portuguese sentences.


Yes, @markdaoust I’m confused with the output_sequence_length. How did it come 64 in the first pic?

So if I specify output_sequence_length=None it will automatically get padded to the longest sequence?

specify output_sequence_length=None it will automatically get padded to the longest sequence?

It’s supposed to.

input is a list of Portuguese sentences.

This screenshot doesn’t help anything, most of the arguments are not shown.

1 Like

Thank you @markdaoust I think I got the point we can control the output sequence length with the parameter output_sequence_length.