Simple Perceptron In Javascript for XOR gate
问题 I tried to use a single perceptron to predict the XOR gate. However, the results seem to be completely random and I cannot find the error. What am I doing wrong here ? - Is my training method wrong? - or is there any error in the perceptron model ? - or a single perceptron cannot be used for this problem ? class Perceptron { constructor(input_nodes, learning_rate) { this.nodes = input_nodes; this.bias = Math.random() * 2 - 1; this.learning_rate = learning_rate; this.weights = []; for (let i =