变量输入是一个锯齿状数组,即 90 x 600。
理想也是 90 x 1 的锯齿状阵列
BeginTraining()
{
FeedforwardNetwork network = new FeedforwardNetwork();
network.AddLayer(new FeedforwardLayer(600));
network.AddLayer(new FeedforwardLayer(1000));
network.AddLayer(new FeedforwardLayer(90));
network.Reset();
// train the neural network
Train train = new HeatonResearchNeural.Feedforward.Train.Backpropagation.Backpropagation(network, input, ideal,
0.7, 0.9);
int epoch = 1;
do
{
lblNoEpochs.Text= epoch.ToString();
lblNoEpochs.Update();
train.Iteration();
lblPcError.Text = train.Error.ToString();
lblPcError.Update();
epoch++;
} while((epoch < 5000) && (train.Error > 0.001));
// test the neural network
for (int i = 0; i < input.Length; i++)
{
//testing code
}
每个 epoch 至少需要 5 分钟。
如何减少这个时间?