Neuralnet package in R - how to gain weight before the convergence of training?

I want to build a learning curve to see the progress of the neural network during its training. The horizontal axis represents the total number of iterations, with the vertical axis representing the error rate. I wanted to see both the test error rate and training, as the network progresses.

nn <- neuralnet(f, data = train, hidden = 2, linear.output = F, threshold = 0.01, stepmax = 10, lifesign = "full", learningrate = .1, algorithm='backprop') 

By setting stepmax = 10 (or 50 or?), I hoped that I could check the network before convergence, see what error rates were on the test and training set, and then continue training for another 10 steps, a (Partially) trained neural network called nn , and I planned to set the starting weights for the weights obtained in the interrupted training, as follows:

 # Try to further train alerady trained net nn <- neuralnet(f, data = train, hidden = 2, linear.output = F, threshold = 0.01, lifesign = "full", learningrate = .1, startweights = nn$weights, algorithm='backprop') 

However, the training gave a warning that "the algorithm did not converge in 1 out of 1 repetition (s) in step max." I did not expect it to converge, but those 10 completed training stages should have changed the initial random weights. Alas, nn $ weight is NULL.

Does anyone know how to do this using neuralnet?

+7
r neural-network
source share
1 answer

I wrote directly to one of the authors of the neuralnet package, Frauke Guenther, and received his final answer:

"Unfortunately, at the moment, trained weights are saved only if the network converges. It is not yet implemented that you can access the weight during the training process or if the network does not converge."

+6
source share

All Articles