I need repeat with batches
For example
x is input tensor and dur tensor with indices lengths from 0 to 3
import torch
x = torch.rand((50, 16, 128))
dur = (torch.rand((50, 16))*3).long()

Then torch.repeat_interleave(x, dur) will raise RuntimeError: repeats must be 0-dim or 1-dim tensor