Simple tutorial for MLP in C++
Hi,
I try to use an MLP for a reinforcement learning. In all tutorials I found, they are used with pictures. But I need an MLP with other input data. Like position (x,y), rotation...
Is there an tutorial that explain a simple MLP? Or is anybody here how can help me?
http://cs.stanford.edu/people/karpath...
Using multi layer perceptron (MLP) artificial neural network (ANN) to solve for the XOR operation: http://answers.opencv.org/question/95...
Sorry man. Is there no support for reinforcement learning in OpenCV?
@sjhalayka apologies for the previous grumpyness...
It's all good.
The link from berak shows what I try to do. But the code isnt C/C++ :(
What I try to do first is, convert a number to binar. For this one I take the code from the post os sjhalayka and modify them.
Is it possible to use this code to a MLP with one input and 10 output neurons so that they learn to convert?
At the moment I have change the input and output in the code. Input is a single neuron for the number, output is 10 neurons. I train the mlp with 100 random generated numbers for input and 100x10 calculated 0 or 1 for the output.
If I run the programm, all looks good but the results are wrong. There must be an problem. But I dont know how I can find it :(
I do that to become more experience with MLP.
Can you post your code in your question?
Sure.
https://pastebin.com/8qZxJu4Q
There it is.
I solve the problem. But now I have a new question. Is it right that train() needs all trainingdata? If a mlp is trained, a new train() destroy all training before?
@hirnfrei no, you can set an update flag in the train() method, so it won't reinitialize the weights (and you can train it with small batches