AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

ANN batch training (How to train online)?

The forum is to discuss topics from different artificial intelligence areas, like neural networks, genetic algorithms, machine learning, etc.

ANN batch training (How to train online)?

Postby Saeed » Sat Oct 13, 2018 12:39 pm

Hi,

I need to have a batch training with my network. I have searched a lot but, I couldn't find any example for accord.net.
In fact because of memory problem I need to train my network with a batch of input data (backpropagation). I tried it with the routine procedure, which e.g. I implemented two separate loops to see if the network works well! but it trains just for one batch (last trained). See the example below.

Could somebody help how can we train the network in this way, please?
Code: Select all
SigmoidFunction activation = new SigmoidFunction(2);
ActivationNetwork network_1 = new ActivationNetwork(
activation,
5, // neurons in the first layer
5,// neurons in the first layer
2); // neuron in the second layer

LML_teacher = new LevenbergMarquardtLearning(network_1, false);

//------------Batch1------------------------------
while (iterations < max_iteration && (error1 > 0.01f))
{
iterations++;
// run epoch of learning procedure
error1 = LML_teacher.RunEpoch(Tnormalized_input1, Tnormalized_output1);
}
// **It learns well for batch1**

//------------Batch2------------------------------
while (iterations < max_iteration && (error1 > 0.01f))
{
iterations++;
// run epoch of learning procedure
error1 = LML_teacher.RunEpoch(Tnormalized_input2, Tnormalized_output2);
}
// **It learns just batch2 and batch1 is missing**
Saeed
 
Posts: 1
Joined: Sat Oct 13, 2018 8:16 am

Re: ANN batch training (How to train online)?

Postby andrew.kirillov » Sat Oct 13, 2018 4:54 pm

Hello,

This forum is about AForge.NET Framework, not Accord.NET Framework. In AForge.NET batch training is not implemented. If you need to know about Accord.NET, then you need to direct your questions to them.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3325
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to Artificial Intelligence