The active function in my CNN has the form:
abs(X)< tou f = 1.716tanh(0.667x)
x >= tou f = 1.716[tanh(2tou/3)+tanh'(2tou/3)(x-tou)]
x <= -tou f = 1.716[tanh(-2tou/3)+tanh'(-2tou/3)(x+tou)]
tou
is a constant.
So, in TensorFlow it is possible to make your own activation function. I don't want to write it in C++ and recompile the whole of TensorFlow.
How can I use the function available in TensorFlow to achieve it?