Fix network not trained when parameters changed.