

Show HN: A basic generic multi layer perceptron - enlightenedfool
https://github.com/pvinay/ml/blob/master/python/vinayml/mlperceptron.py

======
enlightenedfool
You can configure the number of hidden layers as well as their sizes.

~~~
getsat
What exactly is this script training? I don't understand what the input and
output arrays are supposed to represent. It looks almost like an XOR search
but the last output target isn't correct for that.

~~~
enlightenedfool
Right. I should've used a threshold. Fixed now.

print where(outputs > .5, 1, 0)

The example is for OR. In general, inputs is mxn matrix. m - training
instances and n features. targets is training output matrix. In this case its
4x1 for 4. I see sometimes, it doesn't converge after those iterations perhaps
because of initial weights. There are other techniques I have to use like
momentum.

~~~
getsat
Got it. Thanks for replying.

