def neuron_output(weights, inputs): return sigmoid(dot(weights, inputs))
def perceptrons_outputs(weights, bias, x): """returns 1 if perceptron 'fires', 0 if not""" calculation = dot(weights, x) + bias return step_function(calculation)