Configure:配置网络输入和输出,以达到最好的匹配输入和目标数据。使用这个质量可以减少训练次数,减少训练时间。
用法:
net = configure(net,x,t)
net = configure(net,x)
net = configure(net,‘inputs’,x,i)
net = configure(net,‘outputs’,t,i)
例:
[x,t] = simplefit_dataset;
net = feedforwardnet(20); view(net)%此时没有输入和输出;
net = configure(net,x,t); view(net)%已经通过调试,产生过输入和输出;使用configure和不使用的区别:
[x,t] = simplefit_dataset;
net = feedforwardnet(20);
net = configure(net,x,t);
net = train(net,x,t);
使用configure和不使用的区别:
[x,t] = simplefit_dataset;
net = feedforwardnet(20);
net = configure(net,x,t);
net = train(net,x,t);
对于数据量较大的素材,使用configure训练迭代27次,即可满足要求,耗时不足一秒;不使用迭代了1000次,耗时9秒,当然训练效果更好。所以在满足要求的情况下可以使用configure减少训练次数。