As per the pytorch documentation, this is format for torch.arange torch.arange( *start=0* ,  *end* ,  *step=1* ,  *out=None* ,  *dtype=None* ,  *layout=torch.strided* ,  *device=None* ,  *requires_grad=False* ), where start,end and step are numbers.
So you cannot give a tensor as input to arrange. What exactly do you want to do with starts and ends?