for ( int k = 0; k < inputfieldNames.length; k++ ) { Synapse con = new Synapse(); con.setFrom( "" + k ); con.setWeight( weights[ wtsIndex++ ] ); n.getCons().add( con ); for ( int k = 0; k < hiddenSize; k++ ) { Synapse con = new Synapse(); con.setFrom( "" + ( k + inputfieldNames.length ) ); con.setWeight( weights[ wtsIndex++ ] ); n.getCons().add( con );