3 ms·
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 instance
by enlightenedfool 12y ago
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 12y agoGot it. Thanks for replying.