Code the Perceptron Output
Press + to interact
Python 3.5
def weighted_sum(a,b):output = 0for i in range(len(a)):output += (a[i] * b[i])return outputdef perceptron(input, weights):pred = weighted_sum(input,weights)return predweights = [1, 1]input = [2,3]output = perceptron(input, weights)print(node_0_value)
Create a free account to access the full course.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Devpath's Terms of Service and Privacy Policy