本程序是BP算法的演示程序, 其中的Levenberg-Marquardt算法具有實用價值.
一、網絡訓練
程序默認狀態是樣本訓練狀態,現將樣本訓練狀態下的如何訓練網絡進行說明:
1.系統精度:
定義系統目標精度,根據需要定義網絡訓練誤差精度.誤差公式是對訓練出網絡的輸出層節點和實際的網絡輸出結果求平方差的和.
最大訓練次數:
默認為10000次,根據需要調整,如果到達最大訓練次數網絡還未能達到目標精度,程序退出.
3.步長:
默認為0.01,由于采用變步長算法,一般不需人工設置.
4.輸入層數目:
人工神經網絡的輸入層神經元的節點數目.
5.隱含層數目:
人工神經網絡的隱含層神經元的節點數目.
6.輸出層數目:
人工神經網絡的輸出層神經元的節點數目.
7.訓練算法:
強烈建議選取Levenberg-Marquardt算法,該算法經過測試比較穩定.
8.激活函數:
不同的網絡激活函數表現的性能不同,可根據實際情況選擇.
9.樣本數據的處理:
由于程序沒有實現歸一化功能, 因此用來訓練的樣本數據首先要歸一化后才能進行訓練.
標簽:
Levenberg-Marquardt
程序
狀態
樣本
上傳時間:
2013-12-19
上傳用戶:firstbyte
% Train a two layer neural network with the Levenberg-Marquardt
% method.
%
% If desired, it is possible to use regularization by
% weight decay. Also pruned (ie. not fully connected) networks can
% be trained.
%
% Given a set of corresponding input-output pairs and an initial
% network,
% [W1,W2,critvec,iteration,lambda]=marq(NetDef,W1,W2,PHI,Y,trparms)
% trains the network with the Levenberg-Marquardt method.
%
% The activation functions can be either linear or tanh. The
% network architecture is defined by the matrix NetDef which
% has two rows. The first row specifies the hidden layer and the
% second row specifies the output layer.
標簽:
Levenberg-Marquardt
desired
network
neural
上傳時間:
2016-12-27
上傳用戶:jcljkh