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]

 

posted @ 2016-12-23 15:15  有梦就要去实现他  阅读(247)  评论(0编辑  收藏  举报