use of org.jblas.DoubleMatrix in project MindsEye by SimiaCryptus.
the class FullyConnectedLayer method multiplyT.
/**
* Multiply t.
*
* @param matrix the matrix
* @param in the in
* @param out the out
*/
public static void multiplyT(final double[] matrix, @Nonnull final double[] in, @Nonnull final double[] out) {
@Nonnull DoubleMatrix doubleMatrix = new DoubleMatrix(in.length, out.length, matrix);
@Nonnull final DoubleMatrix matrixObj = FullyConnectedLayer.transpose(doubleMatrix);
matrixObj.mmuli(new DoubleMatrix(in.length, 1, in), new DoubleMatrix(out.length, 1, out));
RecycleBin.DOUBLES.recycle(matrixObj.data, matrixObj.data.length);
}
Aggregations