Matrix Manipulation
Transpose
INDArray nd = Nd4j.create(new float[]{1, 2, 3, 4}, new int[]{2, 2});
[1.0 ,3.0]
[2.0 ,4.0]
nd.transpose();
[1.0 ,2.0]
[3.0 ,4.0][1.0 ,3.0 ,5.0 ,7.0 ,9.0 ,11.0]
[2.0 ,4.0 ,6.0 ,8.0 ,10.0 ,12.0][1.0 ,2.0]
[3.0 ,4.0]
[5.0 ,6.0]
[7.0 ,8.0]
[9.0 ,10.0]
[11.0 ,12.0]Reshape
Broadcast
Was this helpful?