Add feedforward implementation to nnCostFunction