In [2]:
inputs = [6, 14, 3]
weights = [0.5, 0.25, 1.4]
[i * w for i, w in zip(inputs, weights)]


Out[2]:
[3.0, 3.5, 4.199999999999999]

In [3]:
import numpy as np

In [4]:
def _sigmoid(x):
    """
    This method is separate from `forward` because it
    will be used later with `backward` as well.

    `x`: A numpy array-like object.

    Return the result of the sigmoid function.

    Your code here!
    """
    return 1 / (1 + np.exp(-1. * x))

In [6]:
_sigmoid(np.array([1., 2., 3.]))


Out[6]:
array([ 0.73105858,  0.88079708,  0.95257413])

In [ ]: