how to make one layer perceptrons learn to show seven segments?
I was asked to write an algorithm to make seven one layer perceptrons learn to show seven segments number according to 4 0-1 inputs, for example -1 -1 开发者_JAVA百科-1 -1 ==> 1 1 1 1 1 1 -1 % 0 -1 -1 -1 1 ==> -1 -1 -1 -1 1 1 -1 % 1 ... can any one help me, please
So, if I'm interpreting this correctly, you give your net a binary representation of a digit and you want it to tell you what line segments are needed to display that digit seven-segments style.
Luckily, since there are only 10 digits, you can just hand write a training set where each digit is correctly matched to the segments needed, and then use the standard perceptron training algorithm: the delta rule.
This algorithm will change the weights of the network until every input pattern is associated with the correct output pattern.
Implementation note: make sure all 4 input units are connected to all 7 output units, and that all of the connection weights start out at some small random value.
精彩评论