# keras needs all its input to have the same shape. The subsample input to the model is then divided in so called "bases" of the same size than the batch, all stored in a list.
# The last base may not be full of samples so it mmust be padded with zeros. Those zeros will be cut off in the model computation.
# If you have a suggestion on how to better implement it, feel free to suggest.