Slicing tensor of different size

Thanks so much for your reply! I worked out something like this Scatter concatenation?, the speed is fine, but cannot be batched.