v0.3.0-dev-9 #324
@ -70,4 +70,14 @@ class TestDoubleLinearOpsTensorAlgebra {
|
|||||||
assertTrue { invTensor.shape contentEquals expectedShape }
|
assertTrue { invTensor.shape contentEquals expectedShape }
|
||||||
assertTrue { invTensor.buffer.array().epsEqual(expectedBuffer) }
|
assertTrue { invTensor.buffer.array().epsEqual(expectedBuffer) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testScalarProduct() = DoubleLinearOpsTensorAlgebra {
|
||||||
|
val a = fromArray(intArrayOf(3), doubleArrayOf(1.8,2.5, 6.8))
|
||||||
|
val b = fromArray(intArrayOf(3), doubleArrayOf(5.5,2.6, 6.4))
|
||||||
|
DoubleReduceOpsTensorAlgebra {
|
||||||
|
assertEquals(a.dot(b).value(), 59.92)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user