Fix setup in ANN.train().