Sigmoid squashes every input into (0, 1), so its output is always positive — a layer of sigmoids tends to push its next layer's weighted sums in one consistent direction, which slows learning down. Tanh fixes this by squashing into (-1, 1) instead, centered on zero:
Task: write tanh_activation(values) applying this element-wise, rounded to 4 decimal places.
|x| saturates toward -1 or 1, just like sigmoid saturates toward 0 or 1.Once your code passes every test, a reference solution shows up here so you can compare it with yours.