Skip to content

Commit 0dd8ece

Browse files
committed
use convenience function to compute output shape
1 parent 04f40e2 commit 0dd8ece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ConvNetSharp.Flow/Ops/MatMult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public override Volume<T> Evaluate(Session<T> session)
5252
var left = this.Parents[0].Evaluate(session);
5353
var right = this.Parents[1].Evaluate(session);
5454

55-
var shape = new Shape(left.Shape.Dimensions[1], right.Shape.Dimensions[0], 1, left.Shape.Dimensions[3]);
55+
var shape = Volume<T>.ComputeMatMultiplyShape(left.Shape, right.Shape);
5656

5757
if (this.Result == null || !Equals(this.Result.Shape, shape))
5858
{

0 commit comments

Comments
 (0)