Hello all~
With torch.arange(start=1, end=4) I will have a tensor [1, 2, 3]
Now if I want to replace the ‘start’ parameter’s value with a tensor, how can I do that without doing the loop?
for example if I have a=[[1], [2]]
If I write torch.arange(start=a, end=a+3)
I want to obtain
[[1, 2, 3],
[2, 3, 4]]
Is it possible to do that without doing the loop?