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