Skip to content

Commit 2721c5a

Browse files
committed
Changed dot implementation
1 parent 5121a85 commit 2721c5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytensor/link/pytorch/dispatch/nlinalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def pytorch_funcify_Dot(op, **kwargs):
99
def dot(x, y):
1010
# Case 1: Vector Product/Matrix Multiplication/1-D Broadcastable Vector
11-
if x.shape < 3 and y.shape < 3:
11+
if x.shape == 1 or y.shape == 1 or (x.shape < 3 and y.shape < 3):
1212
return torch.matmul(x, y)
1313
else:
1414
# Case 2: Stackable batch dimension

0 commit comments

Comments
 (0)