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
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