I found a piece of code in Chapter 7,Section 1 of deep Deep Learning with Python as follow:
from keras.models import Model
from keras import layers
from kera
How does it deal with units?
Units are totally independend of length, so, there is nothing special being done.
Length only increases the "recurrent steps", but recurrent steps use always the same cells over and over.
The number of cells is fixed and defined by the user:
How to deal with variable length?
train_on_batch and predict_on_batch inside a manual loop are the easiest form.
mask_zero=True in the embedding layers.