torch.dot() can only work for 1 dimension tensor. http://pytorch.org/docs/master/torch.html https://github.com/pytorch/pytorch/issues/2313