Update neural net code to the NN (beta) interface.