import torch t = torch.arange(1, 13) # 12 elements: 1..12 print(t.reshape(3, 4)) print(t.reshape(2, 6)) print(t.reshape(12))