So I solved the immediate issue of the exceptions by limiting the batch to those student sequences that are not yet zero. This means that the batch will not always be the same size. It’s not quite what I have envisioned, then again my understanding is yet limited and maybe under the hood the Keras implementation does some stuff that essentially amounts to the same. I would still appreciate feedback/guidance on how to correctly handle that stuff if anyone has any to offer but so far, at least the code is running.