Perceptron: Difference between revisions

m
→‎{{header|Python}}: This change doesn't alter functionality. vars is a reserved word in python and it shouldn't be used as a variable name.
m (syntax highlighting fixup automation)
m (→‎{{header|Python}}: This change doesn't alter functionality. vars is a reserved word in python and it shouldn't be used as a variable name.)
Line 2,674:
 
def feed_forward(self, inputs):
varsweighted_inputs = []
for i in range(len(inputs)):
varsweighted_inputs.append(inputs[i] * self.weights[i])
return self.activate(sum(varsweighted_inputs))
 
def activate(self, value):