Activation functions add the non-linearity that lets neural networks learn complex patterns.
Implement three vectorised functions:
relu(x): relu_grad(x): the derivative of ReLU, which is 1.0 where and 0.0 elsewheregelu(x): the tanh approximation used by GPT-2 and BERT:All three take and return NumPy arrays of any shape.