adjust output dimension for two class problems (uses only a scalar).
add a missing if-guard for debug output in mini-batch gd optimization.