lua中奇葩用法

th> a=torch.zeros(1,5)
                                                                      [0.0001s]
th> a
 0  0  0  0  0
[torch.DoubleTensor of size 1x5]

                                                                      [0.0002s]
th> a[1]
 0
 0
 0
 0
 0
[torch.DoubleTensor of size 5]

th> a=torch.zeros(2,5)
                                                                      [0.0002s]
th> a
 0  0  0  0  0
 0  0  0  0  0
[torch.DoubleTensor of size 2x5]

                                                                      [0.0003s]
th> a[1]
 0
 0
 0
 0
 0
[torch.DoubleTensor of size 5]
原文地址:https://www.cnblogs.com/ymjyqsx/p/6214883.html