dot函数

dot函数是两个向量的点乘,注意lua中dot函数的写法

th> a
 1  2  3
[torch.DoubleTensor of size 1x3]

                                                                      [0.0002s]
th> b
 1  2  0
[torch.DoubleTensor of size 1x3]

                                                                      [0.0002s]
th> c=a:dot(b)
                                                                      [0.0001s]
th> c
5    
    

 

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