-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
todoNot as important as medium or high priority tasks, but we will work on these.Not as important as medium or high priority tasks, but we will work on these.
Description
That would be nice to have the dot function in pytorch consistent with the numpy one:
For 2-D arrays it is equivalent to matrix multiplication, and for 1-D arrays to inner product of vectors (without complex conjugation). For N dimensions it is a sum product over the last axis of a and the second-to-last of b.
https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html
So that with:
x = torch.Tensor(5, 3, 4).normal_()
y = torch.Tensor(4, 7).normal_()
x.dot(y) returns a tensor of shape (5, 3, 7)
apaszke, entron, petered and priya170807
Metadata
Metadata
Assignees
Labels
todoNot as important as medium or high priority tasks, but we will work on these.Not as important as medium or high priority tasks, but we will work on these.