@ Override public INDArray eye ( long n ) { INDArray ret = Nd4j . create ( n , n ) ; for ( int i = 0 ; i < n ; i ++ ) { ret . put ( i , i , 1.0 ) ; } return ret . reshape ( n , n ) ; }
Create the identity ndarray