Activation Function Gradient Computation - Coding problem | OneNoughtOne