How to change default options for newfit () in MATLAB?

I use

net = newfit(in,out,lag(j),{'tansig','tansig'});

to create a new neural network. The default validation checksvalue is 6.

I train a lot of networks and it takes a lot of time. I think it doesn’t matter if my results are a little less accurate, if they can be done much faster. / P>

How can I train faster?

  • I believe that one way could be to reduce the number of validation checks. How can I do this (in code without using a graphical interface)
  • Is there any other way to increase speed.

As I said, the speed increase may decrease slightly with accuracy.

+3
source share
3 answers

Just to increase @mtrw's answer, according to the documentation , training stops when any of these conditions occur:

  • The maximum number of epochs has been reached :net.trainParam.epochs
  • Maximum time exceeded :net.trainParam.time
  • Performance boils down to the goal : net.trainParam.goal
  • The performance gradient falls below min_grad :net.trainParam.min_grad
  • mu exceeds mu_max :net.trainParam.mu_max
  • Verification performance has increased by more than max_fail times since the last time it decreased (when using verification):net.trainParam.max_fail

Epochs and time limits allow you to set the upper limit of the duration of training.

, () /: .

min_grad ( "" ) , , mingrad, . - , , , , , , .

mu, mu_dec mu_max (backpropagation).

max_fail , , .

, , ( ). , , min_grad, /. , max_fails - , .

+5

( : , Mathworks)

, , TRAINLM. net.trainParam.max_fail .

mu, . .

, net.trainParam.epochs 100 . net.trainParam.time .

, net.trainParam.show NaN, .

+1

MATLAB. ( ) , ..

In addition to the answers from mtrw and Amro, make the MATLAB Neural Network Toolbox your new best friend. This usually explains things much better.

0
source

Source: https://habr.com/ru/post/1722873/


All Articles