torch.linspace(start, end, steps=100, out=None)
parameter:
start (float) - the starting point of the interval
end (float) - the end point of the interval
steps (int) – number of samples to generate between start and end
import torch
a=torch.linspace(0,9,10)
print(a.shape)
# print(a)
b=a.repeat(10,1)
print(b.shape)
print(b)
c=a.repeat(2,2,1)
print(c.shape)
print(c)