range函数

 

th> a=torch.range(1,5)
                                                                      [0.0001s]
th> a
 1
 2
 3
 4
 5
[torch.DoubleTensor of size 5]

                                                                      [0.0002s]
th> a=torch.range(1,5,2)
                                                                      [0.0001s]
th> a
 1
 3
 5
[torch.DoubleTensor of size 3]

 

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