title: How to make a custom activation function with only Python in Tensorflow?
body: <p>Suppose you need to make an activation function which is not possible using only pre-defined tensorflow building-blocks, what can you do?</p>
  
  <p>So in Tensorflow it is possible to make your own activation function. But it is quite complicated, you have to write it in C++ and recompile the whole of tensorflow <a href="https://www.quora.com/Is-it-possible-to-add-new-activation-functions-to-TensorFlow-Theano-Torch-How" rel="noreferrer">[1]</a> <a href="https://www.tensorflow.org/versions/r0.11/how_tos/adding_an_op/index.html" rel="noreferrer">[2]</a>.</p>
  
  <p>Is there a simpler way?</p>