Custom Activation and Loss Functions in Keras and TensorFlow with Automatic Differentiation
TensorFlow includes automatic differentiation, which allows a numeric derivative to be calculate for differentiable TensorFlow functions. This allows you to easily create your own loss and activation functions for Keras and TensorFlow in Python.
The code for this video can be found here:
https://github.com/jeffheaton/present/blob/master/youtube/cust_activation_loss.ipynb