private void feedForward(Vec input,List<Vec> activations,List<Vec> derivatives){
  Vec x=input;
  for (int i=0; i < Ws.size(); i++) {
    Matrix W_i=Ws.get(i);
    Vec b_i=bs.get(i);
    Vec a_i=activations.get(i);
    a_i.zeroOut();
    W_i.multiply(x,1,a_i);
    a_i.mutableAdd(b_i);
    a_i.applyFunction(f);
    Vec d_i=derivatives.get(i);
    a_i.copyTo(d_i);
    d_i.applyFunction(f.getD());
    x=a_i;
  }
}

private void feedForward ( Vec input , List < Vec > activations , List < Vec > derivatives ) { Vec x = input ; for ( int i = 0 ; i < Ws . size ( ) ; i ++ ) { Matrix W_i = Ws . get ( i ) ; Vec b_i = bs . get ( i ) ; Vec a_i = activations . get ( i ) ; a_i . zeroOut ( ) ; W_i . multiply ( x , 1 , a_i ) ; a_i . mutableAdd ( b_i ) ; a_i . applyFunction ( f ) ; Vec d_i = derivatives . get ( i ) ; a_i . copyTo ( d_i ) ; d_i . applyFunction ( f . getD ( ) ) ; x = a_i ; } }
feeds a vector through the network to get an output
