done[torch.cumsum(sizes_t - frame_size, dim=0) - 1] = 1