我使用newhop
函数训练了一个Hopfiled网络,当我为我的测试输入数据模拟这个网络时,[y,Pf,Af] = sim(net,{1 repeatnum},{},{im1});
它正常工作但问题是它获得的迭代次数为输入参数例如100次迭代。网络可以例如在第5次迭代中收敛于输入数据,并且不需要继续模拟。有没有办法模拟直到网络收敛?
问候!
答案 0 :(得分:1)
结帐net.adaptParam.goal
。
如有必要,请根据net.adaptFcn
的帮助正确设置net.adaptParam
和help nntrain
。
来自help traingd
:
Training stops when any of these conditions occurs:
1) The maximum number of EPOCHS (repetitions) is reached.
2) The maximum amount of TIME has been exceeded.
3) Performance has been minimized to the GOAL.
4) The performance gradient falls below MINGRAD.
5) Validation performance has increased more than MAX_FAIL times
since the last time it decreased (when using validation).