In [2]:
import numpy as np
def sigmoid(x):
# TODO: Implement sigmoid function
return 1 / (1 + np.exp(-x))
In [3]:
inputs = np.array([0.7, -0.3])
weights = np.array([0.1, 0.8])
bias = -0.1
In [4]:
# TODO: Calculate the output
output = sigmoid(np.matmul(inputs, weights) + bias)
print('Output:')
print(output)
In [ ]: