use of org.nd4j.linalg.api.ops.impl.accum.Mmul in project nd4j by deeplearning4j.
the class Nd4jTestsC method testMmulOp.
@Test
public void testMmulOp() {
INDArray arr = Nd4j.create(new double[][] { { 1, 2, 3 }, { 4, 5, 6 } });
INDArray z = Nd4j.create(2, 2);
INDArray assertion = Nd4j.create(new double[][] { { 14, 32 }, { 32, 77 } });
MMulTranspose mMulTranspose = MMulTranspose.builder().transposeB(true).a(arr).b(arr).build();
DynamicCustomOp op = new Mmul(arr, arr, z, mMulTranspose);
Nd4j.getExecutioner().exec(op);
assertEquals(getFailureMessage(), assertion, z);
}
Aggregations