MLP::getParameters() is not correct
The weights and biases cannot return anything useful as they are not passed in by reference, so the method sets local versions of these only. Also, the extents need to match, so apparently (according to @weefuzzy this may need to be done with reset().