Skip to content

Commit

Permalink
Fixes rrror message in X.dot(w) (#2688)
Browse files Browse the repository at this point in the history
Co-authored-by: KexinFeng <[email protected]>
Co-authored-by: Frank Liu <[email protected]>
  • Loading branch information
3 people authored Jul 4, 2023
1 parent 3c4300d commit 0d00dcb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,9 @@ public PtNDArray dot(NDArray other) {
int otherDim = other.getShape().dimension();
if (selfDim != otherDim || selfDim > 2) {
throw new UnsupportedOperationException(
"Dimension mismatch or high dimensional dot operation is not supported. Please"
+ " use .matMul instead.");
"Dimension mismatch or dimension is greater than 2. Dot product is only"
+ " applied on two 1D vectors. For high dimensions, please use .matMul"
+ " instead.");
}
return JniUtils.dot(this, manager.from(other));
}
Expand Down

0 comments on commit 0d00dcb

Please sign in to comment.