Add sigmoid gradient function.