Row i's valid length: explicit lengths[i] if present, else the row's full (unpadded) id count. Centralizes the back-compat default so loss/forward treat a length-less B=1 batch exactly as before.
lengths[i]
Row i's valid length: explicit
lengths[i]if present, else the row's full (unpadded) id count. Centralizes the back-compat default so loss/forward treat a length-less B=1 batch exactly as before.