Adapt & Train
Matlab中Adapt函数和Train函数的区别
个人理解小结
Adapt根据误差调整,但不生成误差参数。而Train以迭代的方式不断重复误差参数的生成和调整,直至max_epoch reached。
Matlab官方说明分析
1 2 3 4 5 |
adapt calls the function indicated by net.adaptFcn, using the adaption parameter values indicated by net.adaptParam. Given an input sequence with TS steps, the network is updated as follows: Each step in the sequence of inputs is presented to the network one at a time. The network's weight and bias values are updated after each step, before the next step in the sequence is presented. Thus the network is updated TS times. 这就是说,输入输出样本对是按照TS时间延迟来一个一个逐步“调整”网络的权系值的。每给网络一个样本,网络就根据这个样本数据更新一次,如果有N个样本,那网络就更新N次。当然,也可以使网络在输入完所有样本后,再重新将该样本集输入给网络。输入一次样本集(sequence of inputs),就称为一个"pass"。其中,样本集的个数应该等于TS,即前面提到的N=TS。 |
1 2 3 4 5 6 7 8 9 |
train calls the function indicated by net.trainFcn, using the training parameter values indicated by net.trainParam. Typically one epoch of training is defined as a single presentation of all input vectors to the network. The network is then updated according to the results of all those presentations. Training occurs until a maximum number of epochs occurs, the performance goal is met, or any other stopping condition of the function net.trainFcn occurs. Some training functions depart from this norm by presenting only one input vector (or sequence) each epoch. An input vector (or sequence) is chosen randomly each epoch from concurrent input vectors (or sequences). newc and newsom return networks that use trainr, a training function that does this. 这就是说,所有的训练样本都参与了训练过程,即使网络只迭代一次。训练(train)是根据性能函数(或者叫做误差函数)来对权系值的矩阵进行迭代,但调整(adapt)则没有这样的性能函数,仅给了一个误差值。 |