easy primitives

Implement Sigmoid

Implement the sigmoid activation function.

$$\sigma(x) = \frac{1}{1 + e^{-x}}$$

The sigmoid function maps any real number to the range $(0, 1)$.

Input: A tensor x of any shape

Output: A tensor of the same shape with values in $(0, 1)$

Hints

activation basics
Detecting runtime...