Solved by KFrank in post #2 
              
              
                Hi Duy! 

You can add the desired start values to the result of arange(), and do 
so on a tensor basis: 
>>> import torch
>>> torch.__version__
'1.9.0'
>>> start_values = torch.tensor ([1, 2, 5, 7])
>>> torch.arange (3).repeat (4, 1) + start_values.unsqueeze (1)
tensor([[1, 2, 3],
        [2, 3, 4],…